diff --git a/client.cpp b/client.cpp
index 4f400c16da..17799253d1 100644
--- a/client.cpp
+++ b/client.cpp
@@ -596,18 +596,10 @@ bool Client::userNoBorder() const
}
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/client.h b/client.h
index 17316c342a..85047266f0 100644
--- a/client.h
+++ b/client.h
@@ -348,8 +348,6 @@ private:
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 @@ private:
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 @@ private:
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
index 96bb71e54a..d3f7900d69 100644
--- a/geometry.cpp
+++ b/geometry.cpp
@@ -1736,7 +1736,6 @@ void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, in
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 @@ void Client::configureRequest(int value_mask, int rx, int ry, int rw, int rh, in
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 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
bool Client::userCanSetFullScreen() const
{
- if (m_fullscreenMode == FullScreenHack) {
- return false;
- }
- if (!isFullScreenable(false)) {
+ if (!isFullScreenable()) {
return false;
}
return isNormalWindow() || isDialog();
@@ -2463,9 +2458,6 @@ void Client::setFullScreen(bool set, bool user)
if (!wasFullscreen && !set) {
return;
}
- if (m_fullscreenMode == FullScreenHack) {
- return;
- }
if (user && !userCanSetFullScreen()) {
return;
}
@@ -2565,46 +2557,6 @@ QRect Client::fullscreenMonitorsArea(NETFullscreenMonitors requestedTopology) co
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
index 9bbf81a067..2203dbfa76 100644
--- a/kwin.kcfg
+++ b/kwin.kcfg
@@ -108,9 +108,6 @@
true
-
- false
-
1
0
diff --git a/manage.cpp b/manage.cpp
index 26de8f7e40..d3c5adae1e 100644
--- a/manage.cpp
+++ b/manage.cpp
@@ -280,17 +280,6 @@ bool Client::manage(xcb_window_t w, bool isMapped)
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 @@ bool Client::manage(xcb_window_t w, bool isMapped)
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 @@ bool Client::manage(xcb_window_t w, bool isMapped)
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.cpp b/options.cpp
index 094ce5b5cc..9dd7abfef0 100644
--- a/options.cpp
+++ b/options.cpp
@@ -104,7 +104,6 @@ Options::Options(QObject *parent)
, 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 @@ void Options::setFocusStealingPreventionLevel(int focusStealingPreventionLevel)
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 @@ void Options::syncFromKcfgc()
setNextFocusPrefersMouse(m_settings->nextFocusPrefersMouse());
setSeparateScreenFocus(m_settings->separateScreenFocus());
setRollOverDesktops(m_settings->rollOverDesktops());
- setLegacyFullscreenSupport(m_settings->legacyFullscreenSupport());
setFocusStealingPreventionLevel(m_settings->focusStealingPreventionLevel());
#ifdef KWIN_BUILD_DECORATIONS
diff --git a/options.h b/options.h
index 8cfed98885..112ba9442d 100644
--- a/options.h
+++ b/options.h
@@ -111,10 +111,6 @@ class KWIN_EXPORT Options : public QObject
* 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 @@ public:
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 @@ public:
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 @@ Q_SIGNALS:
void snapOnlyWhenOverlappingChanged();
void rollOverDesktopsChanged(bool enabled);
void focusStealingPreventionLevelChanged();
- void legacyFullscreenSupportChanged();
void operationTitlebarDblClickChanged();
void operationMaxButtonLeftClickChanged();
void operationMaxButtonRightClickChanged();
@@ -880,7 +867,6 @@ private:
bool m_snapOnlyWhenOverlapping;
bool m_rollOverDesktops;
int m_focusStealingPreventionLevel;
- bool m_legacyFullscreenSupport;
int m_killPingTimeout;
bool m_hideUtilityWindowsForInactive;
bool m_inactiveTabsSkipTaskbar;