diff --git a/client.h b/client.h --- a/client.h +++ b/client.h @@ -348,8 +348,6 @@ Client* findAutogroupCandidate() const; - bool isFullScreenable(bool fullscreenHack) const; - protected: virtual void debug(QDebug& stream) const; void addDamage(const QRegion &damage) override; @@ -410,8 +408,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(); @@ -514,13 +510,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/client.cpp b/client.cpp --- a/client.cpp +++ b/client.cpp @@ -596,18 +596,10 @@ } bool Client::isFullScreenable() const -{ - return isFullScreenable(false); -} - -bool Client::isFullScreenable(bool fullscreenHack) const { if (!rules()->checkFullScreen(true)) { return false; } - if (fullscreenHack) { - return isNormalWindow(); - } if (rules()->checkStrictGeometry(true)) { // check geometry constraints (rule to obey is set) const QRect fsarea = workspace()->clientArea(FullScreenArea, this); diff --git a/geometry.cpp b/geometry.cpp --- a/geometry.cpp +++ b/geometry.cpp @@ -1736,7 +1736,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)) @@ -1764,7 +1763,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 @@ -2448,10 +2446,7 @@ bool Client::userCanSetFullScreen() const { - if (m_fullscreenMode == FullScreenHack) { - return false; - } - if (!isFullScreenable(false)) { + if (!isFullScreenable()) { return false; } return isNormalWindow() || isDialog(); @@ -2463,9 +2458,6 @@ if (!wasFullscreen && !set) { return; } - if (m_fullscreenMode == FullScreenHack) { - return; - } if (user && !userCanSetFullScreen()) { return; } @@ -2565,46 +2557,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 @@ -280,17 +280,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; @@ -532,9 +521,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; } @@ -566,9 +553,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) @@ -342,13 +338,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, @@ -626,7 +615,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); @@ -813,7 +801,6 @@ void snapOnlyWhenOverlappingChanged(); void rollOverDesktopsChanged(bool enabled); void focusStealingPreventionLevelChanged(); - void legacyFullscreenSupportChanged(); void operationTitlebarDblClickChanged(); void operationMaxButtonLeftClickChanged(); void operationMaxButtonRightClickChanged(); @@ -880,7 +867,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) @@ -326,15 +325,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) { @@ -847,7 +837,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