static GLFWbool createShellSurface(_GLFWwindow* window) { window->wl.shellSurface = wl_shell_get_shell_surface(_glfw.wl.shell, window->wl.surface); if (!window->wl.shellSurface) return GLFW_FALSE; wl_shell_surface_add_listener(window->wl.shellSurface, &shellSurfaceListener, window); if (window->wl.title) wl_shell_surface_set_title(window->wl.shellSurface, window->wl.title); if (window->monitor) { wl_shell_surface_set_fullscreen( window->wl.shellSurface, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, window->monitor->wl.output); } else if (window->wl.maximized) { wl_shell_surface_set_maximized(window->wl.shellSurface, NULL); } else { wl_shell_surface_set_toplevel(window->wl.shellSurface); } wl_surface_commit(window->wl.surface); return GLFW_TRUE; }
void Wayland_MaximizeWindow(_THIS, SDL_Window * window) { SDL_WindowData *wind = window->driverdata; wl_shell_surface_set_maximized(wind->shell_surface, NULL); WAYLAND_wl_display_flush( ((SDL_VideoData*)_this->driverdata)->display ); }
void wlf_ShowWindow(wlfContext* wlfc, wlfWindow* window, BYTE state) { switch (state) { case WINDOW_HIDE: case WINDOW_SHOW_MINIMIZED: /* xdg_surface_set_minimized(window->xdg_surface); */ break; case WINDOW_SHOW_MAXIMIZED: wl_shell_surface_set_maximized(window->shell_surface, NULL); break; case WINDOW_SHOW: wl_shell_surface_set_toplevel(window->shell_surface); break; } }
void Wayland_MaximizeWindow(_THIS, SDL_Window * window) { SDL_WindowData *wind = window->driverdata; SDL_VideoData *viddata = (SDL_VideoData *) _this->driverdata; if (viddata->shell.xdg) { xdg_toplevel_set_maximized(wind->shell_surface.xdg.roleobj.toplevel); } else if (viddata->shell.zxdg) { zxdg_toplevel_v6_set_maximized(wind->shell_surface.zxdg.roleobj.toplevel); } else { wl_shell_surface_set_maximized(wind->shell_surface.wl, NULL); } WAYLAND_wl_display_flush( viddata->display ); }