key-mon
key-mon copied to clipboard
Key-mon not visible and "working" with full-screen View
Hi everyone,
Whenever you use the full-screen mode View (e.g. you press F11 with OpenOffice
or other similar softwares) Key-mon is not visible anymore.
Surely you can make it visible again by pressing the shortcut Alt+Tab but as
soon as you type something Key-mon disappears again...
Having Key-Mon visible and "working" whenever you use the fullscreen mode would
be very useful for artists to record their work (e.g. when painting).
To make it short, when an artist paints something with a software (e.g. Krita)
through his tablet he often prefers to use the Full-screen View.
Unfortunately, by choosing this option, Key-Mon stops being visible and working.
Best regards and THANKS a lot for releasing such a wonderful software :-)
Christian
Original issue reported on code.google.com by [email protected]
on 5 Jun 2011 at 7:17
Thanks for the bug report, didn know about this one. Don't know easy this will
be to fix though.
Original comment by [email protected]
on 6 Jun 2011 at 12:04
It might help to set the WM_TRANSIENT_FOR to the current top most window in the
stack. Though I don't know how easy it is to find the current top most window.
It said in
http://standards.freedesktop.org/wm-spec/1.3/ar01s07.html#STACKINGORDER
[quote]
Stacking order
To obtain good interoperability between different Desktop Environments, the
following layered stacking order is recommended, from the bottom:
windows of type _NET_WM_TYPE_DESKTOP
windows having state _NET_WM_STATE_BELOW
windows not belonging in any other layer
windows of type _NET_WM_TYPE_DOCK (unless they have state _NET_WM_TYPE_BELOW) and windows having state _NET_WM_STATE_ABOVE
focused windows having state _NET_WM_STATE_FULLSCREEN
*Windows that are transient for another window should be kept above this
window.*
The window manager may choose to put some windows in different stacking
positions, for example to allow the user to bring currently a active window to
the top and return it back when the window looses focus.
[/quote]
Original comment by [email protected]
on 14 Jun 2011 at 4:52
Getting to know if key-mon window is covered is easy:
diff -r b5d4b8969379 src/keymon/key_mon.py
--- a/src/keymon/key_mon.py Fri Jul 29 15:55:14 2011 +0800
+++ b/src/keymon/key_mon.py Fri Aug 05 12:29:38 2011 +0800
@@ -394,6 +394,7 @@
self.window.connect('destroy', self.destroy)
self.window.connect('button-press-event', self.button_pressed)
self.window.connect('configure-event', self._window_moved)
+ self.window.connect('visibility-notify-event', self.window_visibility_chang
ed)
self.event_box.connect('button_release_event', self.right_click_handler)
accelgroup = gtk.AccelGroup()
@@ -424,6 +425,12 @@
self.options.x_pos = x
self.options.y_pos = y
+ def window_visibility_changed(self, widget, event):
+ """The window visibility has been changed."""
+ if event.state != gtk.gdk.VISIBILITY_UNOBSCURED:
+ logging.debug('Window obscured, raising')
+ self.window.present()
+
def on_idle(self):
"""Check for events on idle."""
event = self.devices.next_event()
But the code doesn't bring the window back to the top of stack. It seems it
requires doing hide() first then show() in order to put the window back to the
top (need to block notify events from hiding and showing), it does work from my
testing.
Anyway, this would not meet the standard if we tries to make
_NET_WM_STATE_ABOVE window on top of _NET_WM_STATE_FULLSCREEN window, although
WM might allow us to do so.
However, it would be useful for some people, who really need to record with
fullscreen windows.
Original comment by [email protected]
on 5 Aug 2011 at 4:42