void _glfwPlatformShowWindow(_GLFWwindow* window) { MirSurfaceSpec* spec; spec = mir_connection_create_spec_for_changes(_glfw.mir.connection); mir_surface_spec_set_state(spec, mir_surface_state_restored); mir_surface_apply_spec(window->mir.surface, spec); mir_surface_spec_release(spec); }
static void setSurfaceConfinement(_GLFWwindow* window, MirPointerConfinementState state) { MirSurfaceSpec* spec; spec = mir_connection_create_spec_for_changes(_glfw.mir.connection); mir_surface_spec_set_pointer_confinement(spec, state); mir_surface_apply_spec(window->mir.surface, spec); mir_surface_spec_release(spec); }
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) { MirSurfaceSpec* spec; spec = mir_connection_create_spec_for_changes(_glfw.mir.connection); mir_surface_spec_set_width (spec, width); mir_surface_spec_set_height(spec, height); mir_surface_apply_spec(window->mir.surface, spec); mir_surface_spec_release(spec); }
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) { MirSurfaceSpec* spec; const char* e_title = title ? title : ""; spec = mir_connection_create_spec_for_changes(_glfw.mir.connection); mir_surface_spec_set_name(spec, e_title); mir_surface_apply_spec(window->mir.surface, spec); mir_surface_spec_release(spec); }
void SetUp() override { mtf::ConnectedClientWithASurface::SetUp(); // Need fullscreen for the cursor events auto const spec = mir_connection_create_spec_for_changes(connection); mir_surface_spec_set_fullscreen_on_output(spec, 1); mir_surface_apply_spec(surface, spec); mir_surface_spec_release(spec); mir_surface_set_event_handler(surface, &cookie_capturing_callback, this); mir_buffer_stream_swap_buffers_sync(mir_surface_get_buffer_stream(surface)); }