Screen Edge handling in 4.11
Marco Martin
notmart at gmail.com
Mon Jan 21 10:27:13 UTC 2013
On Monday 21 January 2013, Martin Gräßlin wrote:
> Hi workspace devs,
>
> I just finished a rewrite of the Screen Edge handling in KWin [1] and now I
> want to tackle one of the long standing issues: hidden panel activation.
> For those who do not know the plans first designed years ago: instead of
> Plasma keeping track of where the panel is and reacting on the screen
> edge, we just let KWin handle this edge for Plasma and notify Plasma when
> the Panel should be shown. This brings the advantage that KWin and Plasma
> do not fight over the edge (normally KWin should win, though there are
> hacks to make Plasma win) and there is a consistent user experience on how
> to interact with screen edges.
>
> The new architecture has been implemented in a way to make that possible
> and I have thought about how we can setup a protocol which does not only
> suit the Plasma Panel case but also the Gwenview fullscreen & co cases.
>
> As communication medium I propose to use D-Bus and not X11 for the
> following reasons:
> * make it easier to get the changes inside applications - they might not
> like plattform specific code
> * support features where there is not yet a window present, e.g. activating
> KRunner
> * obviously to have an easier way towards Wayland
>
> The protocol I would suggest is:
> 1. Application calls D-Bus function in KWin with the following information
> * which edge to monitor (left/right/top/bottom)
> * offset on edge
> * length on edge
> 2. KWin returns a unique identifier for the registered area
> 3. Whenever this area is triggered, KWin emits a dbus signal with the
> unique identifier as parameter
> 4. If the Application does no longer need the geometry it calls a D-Bus
> function for unregister the geometry with the unique identifier as
> parameter
so if i understood correctly if two apps register the same area, in case of
triggering both apps will be informed, right?
this looks certainly like an improvement, but maybe not in a specific case..
what about there is a fullscreen window (regardless it registered for an edge
or not)? in this case the event should be passed only to the fullscreen window
i think?
about api, seems sane to me (maybe only thing is that an application can
listen to all activations (even if won't know what the edge is) and decide to
do stuff of such activations (an evil and by purpose misuse, but just thinking
if it couldn't have bad implications)
last thing, more on the look stuff. what about making kwin draw the halo that
is now drawn for panels? so would look the same no matter what app needs it.
--
Marco Martin
More information about the Plasma-devel
mailing list