Open GoogleCodeExporter opened 9 years ago
Thanks for the bug report, didn know about this one. Don't know easy this will
be to fix though.
Original comment by scottaki...@gmail.com
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 mozbug...@gmail.com
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 livibet...@gmail.com
on 5 Aug 2011 at 4:42
Original issue reported on code.google.com by
canselm...@gmail.com
on 5 Jun 2011 at 7:17