void wsSetLayer(Display *wsDisplay, Window win, int layer) { vo_x11_setlayer(wsDisplay, win, layer); }
// ---------------------------------------------------------------------------------------------- // Switch to fullscreen. // ---------------------------------------------------------------------------------------------- void wsFullScreen(wsTWindow *win) { int decoration = 0; if (win->isFullScreen) { vo_x11_ewmh_fullscreen(_NET_WM_STATE_REMOVE); // removes fullscreen state if wm supports EWMH if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs win->X = win->OldX; win->Y = win->OldY; win->Width = win->OldWidth; win->Height = win->OldHeight; decoration = win->Decorations; } #ifdef ENABLE_DPMS wsScreenSaverOn(wsDisplay); #endif win->isFullScreen = False; } else { if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs win->OldX = win->X; win->OldY = win->Y; win->OldWidth = win->Width; win->OldHeight = win->Height; vo_dx = win->X; vo_dy = win->Y; vo_dwidth = win->Width; vo_dheight = win->Height; vo_screenwidth = wsMaxX; vo_screenheight = wsMaxY; xinerama_x = wsOrgX; xinerama_y = wsOrgY; update_xinerama_info(); wsMaxX = vo_screenwidth; wsMaxY = vo_screenheight; wsOrgX = xinerama_x; wsOrgY = xinerama_y; win->X = wsOrgX; win->Y = wsOrgY; win->Width = wsMaxX; win->Height = wsMaxY; } win->isFullScreen = True; #ifdef ENABLE_DPMS wsScreenSaverOff(wsDisplay); #endif vo_x11_ewmh_fullscreen(_NET_WM_STATE_ADD); // adds fullscreen state if wm supports EWMH } if (!(vo_fs_type & vo_wm_FULLSCREEN)) { // shouldn't be needed with EWMH fs vo_x11_decoration(wsDisplay, win->WindowID, decoration); vo_x11_sizehint(win->X, win->Y, win->Width, win->Height, 0); vo_x11_setlayer(wsDisplay, win->WindowID, win->isFullScreen); if ((!(win->isFullScreen)) & vo_ontop) vo_x11_setlayer(wsDisplay, win->WindowID, 1); XMoveResizeWindow(wsDisplay, win->WindowID, win->X, win->Y, win->Width, win->Height); } if (vo_wm_type == 0 && !(vo_fsmode & 16)) { XWithdrawWindow(wsDisplay, win->WindowID, wsScreen); } XMapRaised(wsDisplay, win->WindowID); XRaiseWindow(wsDisplay, win->WindowID); XFlush(wsDisplay); }
/** * @brief Set the layer for a window. * * @param display display * @param Win window * @param fullscreen whether to set fullscreen or normal layer */ void wsWindowLayer(Display *display, Window Win, Bool fullscreen) { vo_x11_setlayer(display, Win, fullscreen); }