KWin highlight window effect trigger code

Marco Martin notmart at gmail.com
Wed Feb 11 10:28:44 CET 2009


On Monday 09 February 2009, Lucas Murray wrote:
> Attached is the required code to trigger KWin's new highlight window
> effect. This effect highlights the requested window by fading out all
> others allowing the user to see the window even if it's covered.
>
> This patch is purely proof-of-concept as it adds code to an suboptimal
> location in the Plasma codebase and requires taskbar thumbnails to be
> enabled for the code to be executed. I'll leave it up to the Plasma
> team as to how they want to correctly implement this feature; I am not
> familiar with the Plasma code at all so I cannot do it myself.
probably would be more in the taskbar than in the tooltips, so it could work 
also when tooltips are globally turned off, anyways i'm cool with it, don't 
think the effect should be enabled by default because changing opacity of 
every window (if i understood correctly how it works) looks a bit "massive", 
but it's definitely a nice addition to have
> It works by attaching an X property atom called
> "_KDE_WINDOW_HIGHLIGHT" to a window that Plasma controls and contains
> the X window ID of the window to highlight. If the property is deleted
> or if the managing window is destroyed the effect terminates. Keen
> eyes will notice that ToolTip::hide() is actually redundant in this
> particular patch.
>
> It is only possible to highlight a single window at a time as I cannot
> think of any scenario where highlighting multiple windows would be
> useful over not highlighting any at all. If anyone can think of one
> feel free to mention it.
>
> I have also yet to determine what the effect should do if the
> requested window to highlight isn't on the current desktop. There is
> no need to display a thumbnail as that's what taskbar thumbnails does
> but what happens when the user has disabled that effect? Should it
> show a thumbnail with an arrow pointing in the direction of the
> desktop that the window is on? Should it display the window in the
> same position as it is on the other desktop? Should it display a
> pager-like thing in the center of the screen with the desktop that the
> window is on highlighted? Should it even show anything at all?




More information about the Plasma-devel mailing list