From kwin Sun Aug 30 16:58:13 2009 From: Martin =?utf-8?q?Gr=C3=A4=C3=9Flin?= Date: Sun, 30 Aug 2009 16:58:13 +0000 To: kwin Subject: Drop kwin's fullscreen hack Message-Id: <200908301858.24370.kde () martin-graesslin ! com> X-MARC-Message: https://marc.info/?l=kwin&m=125165155313163 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1136767791==" --===============1136767791== Content-Type: multipart/signed; boundary="nextPart2059139.bec4AQG1uD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2059139.bec4AQG1uD Content-Type: multipart/mixed; boundary="Boundary-01=_m+qmKQJOaRcULc/" Content-Transfer-Encoding: 7bit --Boundary-01=_m+qmKQJOaRcULc/ Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Attached is a patch to remove kwin's fullscreen hack for not-netwm windows= =20 without borders and the screen geometry. I want to drop it because the Plas= ma=20 netbook shell has no border and has the screen geometry and has said to be = not=20 fullscreen, but is made fullscreen by the hack and by that set above all ot= her=20 windows which isn't intended. Are there any reasons to not commit the patch? It will break legacy=20 applications, but after all that time I think we could start enforcing netw= m=20 ;-) And it is still possible to define a window rule for supporting the leg= acy=20 applications. --Boundary-01=_m+qmKQJOaRcULc/ Content-Type: text/x-patch; charset="UTF-8"; name="fullscreen-hack.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fullscreen-hack.diff" commit bf48780d46358fb6249a63c8ca8ee666bf795b84 Author: Martin Gr=C3=A4=C3=9Flin Date: Sun Aug 30 18:48:15 2009 +0200 Remove fullscreen hack diff --git a/client.h b/client.h index fa5dc47..b2de3d8 100644 =2D-- a/client.h +++ b/client.h @@ -391,8 +391,6 @@ class Client QRect fullscreenMonitorsArea( NETFullscreenMonitors topology ) con= st; void changeMaximize( bool horizontal, bool vertical, bool adjust ); void checkMaximizeGeometry(); =2D int checkFullScreenHack( const QRect& geom ) const; // 0 - None,= 1 - One xinerama screen, 2 - Full area =2D void updateFullScreenHack( const QRect& geom ); void getWmNormalHints(); void getMotifHints(); void getIcons(); @@ -528,8 +526,7 @@ class Client enum FullScreenMode { FullScreenNone, =2D FullScreenNormal, =2D FullScreenHack ///< Non-NETWM fullscreen (noborder and size = of desktop) + FullScreenNormal }; FullScreenMode fullscreen_mode; MaximizeMode max_mode; diff --git a/geometry.cpp b/geometry.cpp index c4cc4f2..d502299 100644 =2D-- a/geometry.cpp +++ b/geometry.cpp @@ -1722,7 +1722,6 @@ void Client::configureRequest( int value_mask, int rx= , int ry, int rw, int rh, i move( new_pos ); plainResize( ns ); setGeometry( QRect( calculateGravitation( false, gravity ), si= ze())); =2D updateFullScreenHack( QRect( new_pos, QSize( nw, nh ))); QRect area =3D workspace()->clientArea( WorkArea, this ); if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isF= ullScreen() && area.contains( orig_geometry )) @@ -1756,7 +1755,6 @@ void Client::configureRequest( int value_mask, int rx= , int ry, int rw, int rh, i xSizeHint.win_gravity =3D gravity; resizeWithChecks( ns ); xSizeHint.win_gravity =3D save_gravity; =2D updateFullScreenHack( QRect( calculateGravitation( true, xSi= zeHint.win_gravity ), QSize( nw, nh ))); if( !from_tool && ( !isSpecialWindow() || isToolbar()) && !isF= ullScreen()) { // try to keep the window in its xinerama screen if possib= le, @@ -2442,8 +2440,6 @@ bool Client::isFullScreenable( bool fullscreen_hack )= const =20 bool Client::userCanSetFullScreen() const { =2D if( fullscreen_mode =3D=3D FullScreenHack ) =2D return false; if( !isFullScreenable( false )) return false; // isMaximizable() returns false if fullscreen @@ -2455,8 +2451,6 @@ void Client::setFullScreen( bool set, bool user ) { if( !isFullScreen() && !set ) return; =2D if( fullscreen_mode =3D=3D FullScreenHack ) =2D return; if( user && !userCanSetFullScreen()) return; set =3D rules()->checkFullScreen( set ); @@ -2535,48 +2529,6 @@ QRect Client::fullscreenMonitorsArea(NETFullscreenMo= nitors requestedTopology) co return total; } =20 =2D =2Dint Client::checkFullScreenHack( const QRect& geom ) const =2D { =2D // if it's noborder window, and has size of one screen or the whole = desktop geometry, it's fullscreen hack =2D if( noBorder() && app_noborder && isFullScreenable( true )) =2D { =2D if( geom.size() =3D=3D workspace()->clientArea( FullArea, geom.c= enter(), desktop()).size()) =2D return 2; // full area fullscreen hack =2D if( geom.size() =3D=3D workspace()->clientArea( ScreenArea, geom= =2Ecenter(), desktop()).size()) =2D return 1; // xinerama-aware fullscreen hack =2D } =2D return 0; =2D } =2D =2Dvoid Client::updateFullScreenHack( const QRect& geom ) =2D { =2D int type =3D checkFullScreenHack( geom ); =2D if( fullscreen_mode =3D=3D FullScreenNone && type !=3D 0 ) =2D { =2D fullscreen_mode =3D FullScreenHack; =2D updateDecoration( false, false ); =2D QRect geom; =2D if( rules()->checkStrictGeometry( false )) =2D { =2D geom =3D type =3D=3D 2 // 1 - it's xinerama-aware fullscreen= hack, 2 - it's full area =2D ? workspace()->clientArea( FullArea, geom.center(), desk= top()) =2D : workspace()->clientArea( ScreenArea, geom.center(), de= sktop()); =2D } =2D else =2D geom =3D workspace()->clientArea( FullScreenArea, geom.cente= r(), desktop()); =2D setGeometry( geom ); =2D } =2D else if( fullscreen_mode =3D=3D FullScreenHack && type =3D=3D 0 ) =2D { =2D fullscreen_mode =3D FullScreenNone; =2D updateDecoration( false, false ); =2D // whoever called this must setup correct geometry =2D } =2D StackingUpdatesBlocker blocker( workspace()); =2D workspace()->updateClientLayer( this ); // active fullscreens get di= fferent layer =2D } =2D static QRect* visible_bound =3D 0; static GeometryTip* geometryTip =3D 0; =20 diff --git a/manage.cpp b/manage.cpp index 7a8f661..850b6a5 100644 =2D-- a/manage.cpp +++ b/manage.cpp @@ -215,20 +215,6 @@ bool Client::manage( Window w, bool isMapped ) else area =3D workspace()->clientArea( PlacementArea, cursorPos(), desk= top() ); =20 =2D if( int type =3D checkFullScreenHack( geom )) =2D { =2D fullscreen_mode =3D FullScreenHack; =2D if( rules()->checkStrictGeometry( false )) =2D { =2D geom =3D type =3D=3D 2 // 1 =3D It's xinerama-aware fullscre= en hack, 2 =3D It's full area =2D ? workspace()->clientArea( FullArea, geom.center(), desk= top() ) =2D : workspace()->clientArea( ScreenArea, geom.center(), de= sktop() ); =2D } =2D else =2D geom =3D workspace()->clientArea( FullScreenArea, geom.cente= r(), desktop() ); =2D placementDone =3D true; =2D } =2D if( isDesktop() ) // KWin doesn't manage desktop windows placementDone =3D true; @@ -377,8 +363,6 @@ bool Client::manage( Window w, bool isMapped ) maximize( MaximizeMode( session->maximized )); geom_restore =3D session->restore; } =2D if( session->fullscreen =3D=3D FullScreenHack ) =2D ; // Nothing, this should be already set again above else if( session->fullscreen !=3D FullScreenNone ) { setFullScreen( true, false ); @@ -436,7 +420,7 @@ bool Client::manage( Window w, bool isMapped ) demandAttention(); if( info->state() & NET::Modal ) setModal( true ); =2D if( fullscreen_mode !=3D FullScreenHack && isFullScreenable() ) + if( isFullScreenable() ) setFullScreen( rules()->checkFullScreen( info->state() & NET::= =46ullScreen, !isMapped ), false ); } =20 --Boundary-01=_m+qmKQJOaRcULc/-- --nextPart2059139.bec4AQG1uD Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iJwEAAECAAYFAkqar6YACgkQ/umpWjNT6CLa+AP/XNcap+HLCxDNji9lo1IYKZOO mHDDXRcFkxEmmfMJ0GILuMshXLmJy6vnLpCBnNgllZ+psWof+aw6SJKPmu6UcFiB +2fw7keXTAxiSsXtQRT+Bm5BNS2WwFxCQmqthaZQ6ws+MzC1J2QopmBM0NBxNw7U KKG4IgBIEjErA59VOdA= =6enX -----END PGP SIGNATURE----- --nextPart2059139.bec4AQG1uD-- --===============1136767791== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kwin mailing list kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin --===============1136767791==--