diff --git a/client.h b/client.h --- a/client.h +++ b/client.h @@ -409,8 +409,6 @@ void updateAllowedActions(bool force = false); QRect fullscreenMonitorsArea(NETFullscreenMonitors topology) const; void changeMaximize(bool horizontal, bool vertical, bool adjust) override; - int checkFullScreenHack(const QRect& geom) const; // 0 - None, 1 - One xinerama screen, 2 - Full area - void updateFullScreenHack(const QRect& geom); void getWmNormalHints(); void getMotifHints(); void getIcons(); @@ -513,13 +511,12 @@ uint app_noborder : 1; ///< App requested no border via window type, shape extension, etc. uint ignore_focus_stealing : 1; ///< Don't apply focus stealing prevention to this client bool blocks_compositing; - // DON'T reorder - Saved to config files !!! + enum FullScreenMode { FullScreenNone, - FullScreenNormal, - FullScreenHack ///< Non-NETWM fullscreen (noborder and size of desktop) - }; - FullScreenMode m_fullscreenMode; + FullScreenNormal + } m_fullscreenMode; + MaximizeMode max_mode; QRect geom_restore; QRect geom_fs_restore; diff --git a/geometry.cpp b/geometry.cpp --- a/geometry.cpp +++ b/geometry.cpp @@ -1754,7 +1754,6 @@ move(new_pos); plainResize(ns); setGeometry(QRect(calculateGravitation(false, gravity), size())); - updateFullScreenHack(QRect(new_pos, QSize(nw, nh))); QRect area = workspace()->clientArea(WorkArea, this); if (!from_tool && (!isSpecialWindow() || isToolbar()) && !isFullScreen() && area.contains(origClientGeometry)) @@ -1782,7 +1781,6 @@ QRect origClientGeometry(pos() + clientPos(), clientSize()); GeometryUpdatesBlocker blocker(this); resizeWithChecks(ns, xcb_gravity_t(gravity)); - updateFullScreenHack(QRect(calculateGravitation(true, m_geometryHints.windowGravity()), QSize(nw, nh))); if (!from_tool && (!isSpecialWindow() || isToolbar()) && !isFullScreen()) { // try to keep the window in its xinerama screen if possible, // if that fails at least keep it visible somewhere @@ -2485,9 +2483,6 @@ bool Client::userCanSetFullScreen() const { - if (m_fullscreenMode == FullScreenHack) { - return false; - } if (!isFullScreenable(false)) { return false; } @@ -2500,9 +2495,6 @@ if (!wasFullscreen && !set) { return; } - if (m_fullscreenMode == FullScreenHack) { - return; - } if (user && !userCanSetFullScreen()) { return; } @@ -2603,46 +2595,6 @@ return total; } - -int Client::checkFullScreenHack(const QRect& geom) const -{ - if (!options->isLegacyFullscreenSupport()) - return 0; - // if it's noborder window, and has size of one screen or the whole desktop geometry, it's fullscreen hack - if (noBorder() && app_noborder && isFullScreenable(true)) { - if (geom.size() == workspace()->clientArea(FullArea, geom.center(), desktop()).size()) - return 2; // full area fullscreen hack - if (geom.size() == workspace()->clientArea(ScreenArea, geom.center(), desktop()).size()) - return 1; // xinerama-aware fullscreen hack - } - return 0; -} - -void Client::updateFullScreenHack(const QRect& geom) -{ - int type = checkFullScreenHack(geom); - if (m_fullscreenMode == FullScreenNone && type != 0) { - m_fullscreenMode = FullScreenHack; - updateDecoration(false, false); - QRect geom; - if (rules()->checkStrictGeometry(false)) { - geom = type == 2 // 1 - it's xinerama-aware fullscreen hack, 2 - it's full area - ? workspace()->clientArea(FullArea, geom.center(), desktop()) - : workspace()->clientArea(ScreenArea, geom.center(), desktop()); - } else - geom = workspace()->clientArea(FullScreenArea, geom.center(), desktop()); - setGeometry(geom); - emit fullScreenChanged(); - } else if (m_fullscreenMode == FullScreenHack && type == 0) { - m_fullscreenMode = FullScreenNone; - updateDecoration(false, false); - // whoever called this must setup correct geometry - emit fullScreenChanged(); - } - StackingUpdatesBlocker blocker(workspace()); - workspace()->updateClientLayer(this); // active fullscreens get different layer -} - static GeometryTip* geometryTip = 0; void Client::positionGeometryTip() diff --git a/kwin.kcfg b/kwin.kcfg --- a/kwin.kcfg +++ b/kwin.kcfg @@ -108,9 +108,6 @@ true - - false - 1 0 diff --git a/manage.cpp b/manage.cpp --- a/manage.cpp +++ b/manage.cpp @@ -279,17 +279,6 @@ area = workspace()->clientArea(PlacementArea, screens()->geometry(screen).center(), desktop()); } - if (int type = checkFullScreenHack(geom)) { - m_fullscreenMode = FullScreenHack; - if (rules()->checkStrictGeometry(false)) { - geom = type == 2 // 1 = It's xinerama-aware fullscreen hack, 2 = It's full area - ? workspace()->clientArea(FullArea, geom.center(), desktop()) - : workspace()->clientArea(ScreenArea, geom.center(), desktop()); - } else - geom = workspace()->clientArea(FullScreenArea, geom.center(), desktop()); - placementDone = true; - } - if (isDesktop()) // KWin doesn't manage desktop windows placementDone = true; @@ -531,9 +520,7 @@ if (session->maximized != MaximizeRestore) { maximize(MaximizeMode(session->maximized)); } - if (session->fullscreen == FullScreenHack) - ; // Nothing, this should be already set again above - else if (session->fullscreen != FullScreenNone) { + if (session->fullscreen != FullScreenNone) { setFullScreen(true, false); geom_fs_restore = session->fsrestore; } @@ -565,9 +552,8 @@ demandAttention(); if (info->state() & NET::Modal) setModal(true); - if (m_fullscreenMode != FullScreenHack) { - setFullScreen(rules()->checkFullScreen(info->state() & NET::FullScreen, !isMapped), false); - } + + setFullScreen(rules()->checkFullScreen(info->state() & NET::FullScreen, !isMapped), false); } updateAllowedActions(true); diff --git a/options.h b/options.h --- a/options.h +++ b/options.h @@ -111,10 +111,6 @@ * 0 - 4 , see Workspace::allowClientActivation() **/ Q_PROPERTY(int focusStealingPreventionLevel READ focusStealingPreventionLevel WRITE setFocusStealingPreventionLevel NOTIFY focusStealingPreventionLevelChanged) - /** - * support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry - */ - Q_PROPERTY(bool legacyFullscreenSupport READ isLegacyFullscreenSupport WRITE setLegacyFullscreenSupport NOTIFY legacyFullscreenSupportChanged) Q_PROPERTY(KWin::Options::WindowOperation operationTitlebarDblClick READ operationTitlebarDblClick WRITE setOperationTitlebarDblClick NOTIFY operationTitlebarDblClickChanged) Q_PROPERTY(KWin::Options::WindowOperation operationMaxButtonLeftClick READ operationMaxButtonLeftClick WRITE setOperationMaxButtonLeftClick NOTIFY operationMaxButtonLeftClickChanged) Q_PROPERTY(KWin::Options::WindowOperation operationMaxButtonMiddleClick READ operationMaxButtonMiddleClick WRITE setOperationMaxButtonMiddleClick NOTIFY operationMaxButtonMiddleClickChanged) @@ -333,13 +329,6 @@ return m_focusStealingPreventionLevel; } - /** - * support legacy fullscreen windows hack: borderless non-netwm windows with screen geometry - */ - bool isLegacyFullscreenSupport() const { - return m_legacyFullscreenSupport; - } - enum WindowOperation { MaximizeOp = 5000, RestoreOp, @@ -614,7 +603,6 @@ void setSnapOnlyWhenOverlapping(bool snapOnlyWhenOverlapping); void setRollOverDesktops(bool rollOverDesktops); void setFocusStealingPreventionLevel(int focusStealingPreventionLevel); - void setLegacyFullscreenSupport(bool legacyFullscreenSupport); void setOperationTitlebarDblClick(WindowOperation operationTitlebarDblClick); void setOperationMaxButtonLeftClick(WindowOperation op); void setOperationMaxButtonRightClick(WindowOperation op); @@ -805,7 +793,6 @@ void snapOnlyWhenOverlappingChanged(); void rollOverDesktopsChanged(bool enabled); void focusStealingPreventionLevelChanged(); - void legacyFullscreenSupportChanged(); void operationTitlebarDblClickChanged(); void operationMaxButtonLeftClickChanged(); void operationMaxButtonRightClickChanged(); @@ -873,7 +860,6 @@ bool m_snapOnlyWhenOverlapping; bool m_rollOverDesktops; int m_focusStealingPreventionLevel; - bool m_legacyFullscreenSupport; int m_killPingTimeout; bool m_hideUtilityWindowsForInactive; bool m_inactiveTabsSkipTaskbar; diff --git a/options.cpp b/options.cpp --- a/options.cpp +++ b/options.cpp @@ -104,7 +104,6 @@ , m_snapOnlyWhenOverlapping(false) , m_rollOverDesktops(false) , m_focusStealingPreventionLevel(0) - , m_legacyFullscreenSupport(false) , m_killPingTimeout(0) , m_hideUtilityWindowsForInactive(false) , m_inactiveTabsSkipTaskbar(false) @@ -327,15 +326,6 @@ emit focusStealingPreventionLevelChanged(); } -void Options::setLegacyFullscreenSupport(bool legacyFullscreenSupport) -{ - if (m_legacyFullscreenSupport == legacyFullscreenSupport) { - return; - } - m_legacyFullscreenSupport = legacyFullscreenSupport; - emit legacyFullscreenSupportChanged(); -} - void Options::setOperationTitlebarDblClick(WindowOperation operationTitlebarDblClick) { if (OpTitlebarDblClick == operationTitlebarDblClick) { @@ -858,7 +848,6 @@ setNextFocusPrefersMouse(m_settings->nextFocusPrefersMouse()); setSeparateScreenFocus(m_settings->separateScreenFocus()); setRollOverDesktops(m_settings->rollOverDesktops()); - setLegacyFullscreenSupport(m_settings->legacyFullscreenSupport()); setFocusStealingPreventionLevel(m_settings->focusStealingPreventionLevel()); #ifdef KWIN_BUILD_DECORATIONS