From kwin Sun Mar 20 16:31:38 2011 From: =?utf-8?q?Martin_Gr=C3=A4=C3=9Flin?= Date: Sun, 20 Mar 2011 16:31:38 +0000 To: kwin Subject: Re: Review Request: Add Rule/Property based composite blocking Message-Id: <20110320163138.8857.45248 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kwin&m=130063873905544 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1990219243==" --===============1990219243== Content-Type: multipart/alternative; boundary="===============2840720863921272597==" --===============2840720863921272597== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/100893/#review2063 ----------------------------------------------------------- Very nice functionality, I like it. Probably we should extend it to * announce support in _NET_SUPPORTED * add functionality to netwm/KWindowSystem * bring it to NETWM spec (though I doubt we have success given that GNOME S= hell and Unity require compositing all the time) kwin/client.h maybe more Qt-style: isBlockingComposition()? kwin/client.cpp Why the bool readProperty? If I read the code correctly it's a no-op if= readProperty is false kwin/client.cpp shouldn't the rules check be outside the if (readProperty) check? - Martin On March 20, 2011, 3:11 p.m., Thomas L=C3=BCbking wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/100893/ > ----------------------------------------------------------- > = > (Updated March 20, 2011, 3:11 p.m.) > = > = > Review request for kwin. > = > = > Summary > ------- > = > Allows windows (or users via the rule system) to block compositing while = they're present. > The user still can resume and re-suspend compositing at any time (but if = it has originally been suspended for a blocking client it will be resumed t= he moment the last blocking client disappears) > = > Outstanding issue is that the rules to not allow to apply by fullscreen m= ode. > No real idea how we should handle this (add to rules globally or do some = rule specific) > = > = > Diffs > ----- > = > kwin/atoms.h 7d5752c = > kwin/atoms.cpp 5e93b2a = > kwin/client.h 0d479a0 = > kwin/client.cpp ec60bde = > kwin/composite.cpp 6783d32 = > kwin/events.cpp 05cf864 = > kwin/kcmkwin/kwinrules/ruleswidget.h ca44bf2 = > kwin/kcmkwin/kwinrules/ruleswidget.cpp f9fc407 = > kwin/kcmkwin/kwinrules/ruleswidgetbase.ui 74ac56b = > kwin/manage.cpp 135a016 = > kwin/rules.h 87b2055 = > kwin/rules.cpp 9e4136a = > kwin/workspace.h 3f6ad49 = > kwin/workspace.cpp 3c77511 = > = > Diff: http://git.reviewboard.kde.org/r/100893/diff > = > = > Testing > ------- > = > Rule based & "xprop -f _KDE_NET_WM_BLOCK_COMPOSITING 32a -set _KDE_NET_WM= _BLOCK_COMPOSITING 1" > No client internal property setting tested (so far) but it should work as= well... ;-) > = > = > Thanks, > = > Thomas > = > --===============2840720863921272597== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/100893/

Very nice =
functionality, I like it.

Probably we should extend it to
* announce support in _NET_SUPPORTED
* add functionality to netwm/KWindowSystem
* bring it to NETWM spec (though I doubt we have success given that GNOME S=
hell and Unity require compositing all the time)

= =
kwin/client.h (Diff revision 1)
public:
298
    inline bool blocksCompositing() { return=
 blocks_compositing; }
maybe more Qt-style: isBlockingComposition()?

= =
kwin/client.cpp (Diff revision 1)
void Client::updateCursor()
2114
void Client::updateComposit=
eBlocking(bool readProperty)
2115
{
2116
    const bool usedToBlock =
=3D blocks_compositing;
2117
    if (readProperty)=
 {
Why the bool readProperty? If I read the code correctly it's a n=
o-op if readProperty is false

= =
kwin/client.cpp (Diff revision 1)
void Client::updateCursor()
2124
            blocks_compositi=
ng =3D rules()->checkB=
lockCompositing(prop_retu=
rn !=3D X::None);<=
/pre>
shouldn't the rules check be outside the if (readProperty) check=
?

- Martin


On March 20th, 2011, 3:11 p.m., Thomas L=C3=BCbking wrote:

Review request for kwin.
By Thomas L=C3=BCbking.

Updated March 20, 2011, 3:11 p.m.

Descripti= on

Allows windows (or users via the rule system) to block compo=
siting while they're present.
The user still can resume and re-suspend compositing at any time (but if it=
 has originally been suspended for a blocking client it will be resumed the=
 moment the last blocking client disappears)

Outstanding issue is that the rules to not allow to apply by fullscreen mod=
e.
No real idea how we should handle this (add to rules globally or do some ru=
le specific)

Testing <= /h1>
Rule based & "xprop -f _KDE_NET_WM_BLOCK_COMPOSITIN=
G 32a -set _KDE_NET_WM_BLOCK_COMPOSITING 1"
No client internal property setting tested (so far) but it should work as w=
ell... ;-)

Diffs=

  • kwin/atoms.h (7d5752c)
  • kwin/atoms.cpp (5e93b2a)
  • kwin/client.h (0d479a0)
  • kwin/client.cpp (ec60bde)
  • kwin/composite.cpp (6783d32)
  • kwin/events.cpp (05cf864)
  • kwin/kcmkwin/kwinrules/ruleswidget.h (ca44= bf2)
  • kwin/kcmkwin/kwinrules/ruleswidget.cpp (f9= fc407)
  • kwin/kcmkwin/kwinrules/ruleswidgetbase.ui = (74ac56b)
  • kwin/manage.cpp (135a016)
  • kwin/rules.h (87b2055)
  • kwin/rules.cpp (9e4136a)
  • kwin/workspace.h (3f6ad49)
  • kwin/workspace.cpp (3c77511)

View Diff

--===============2840720863921272597==-- --===============1990219243== 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 --===============1990219243==--