KWin highlight window effect trigger code
Lucas Murray
lmurray at undefinedfire.com
Mon Feb 9 13:47:28 CET 2009
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.
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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plasma-kwin-highlight-window.diff
Type: text/x-patch
Size: 2720 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090209/298aba41/attachment.diff
More information about the Plasma-devel
mailing list