Xpra: Ticket #761: hovering on a window sitting in the background can cause it to be raised when a tooltip is shown

Reproduce:

  1. Server-side, xpra start :100 --start-child=xterm --bind-tcp=0.0.0.0:53000
  2. Client-side, xpra attach tcp:IP:100.
  3. From xterm, type: firefox. Now Firefox is focused.
  4. Focus to xterm. Move your mouse pointer to anywhere which can appear tooltip( for example: title of tabs,...)
  5. Tooltip appear and xterm is hidden behind Firefox.
  6. Minimize Firefox, xterm is shown, so xterm doesn't minimize, but hidden.

I use Ubuntu 12.04 for server and Windows 7 for client.



Wed, 10 Dec 2014 10:16:57 GMT - peterlong0210: attachment set


Wed, 10 Dec 2014 10:26:45 GMT - peterlong0210:

I's just check again. It's occur only with tooltip from mouse point in FIREFOX. CHROME is not occur. PS: Xpra version is 0.14.13 at both client and server


Thu, 11 Dec 2014 02:00:50 GMT - peterlong0210: owner deleted

I used -d focus log. When xterm is hidden behind Firefox, focus not change.


Thu, 11 Dec 2014 02:01:30 GMT - peterlong0210: owner set


Thu, 11 Dec 2014 18:59:36 GMT - Antoine Martin: owner changed

I'm not sure there's much we can do about this.

-d focus produces log output - which we need to debug things, it is not meant to change the behaviour.


Thu, 11 Dec 2014 20:39:41 GMT - Antoine Martin: summary changed; keywords set

Confirmed on Windows 7 (bug is not present on OSX or Linux clients) - edited title to try to explain it better.

Please provide logs.


Fri, 12 Dec 2014 01:13:25 GMT - peterlong0210: attachment set

Reproduce ticket #761


Fri, 12 Dec 2014 01:22:39 GMT - peterlong0210: owner changed

I attached a log file. At server-side:

xpra start :100 --start-child="xterm|firefox" --bind-tcp=0.0.0.0:53000

At client-side:

xpra_cmd attach tcp:192.168.2.55:53000 --encoding=rgb --no-cursor -d focus

You can see more detail from the log file.


Sat, 20 Dec 2014 00:04:50 GMT - alas:

I tested also with the xpra.org 0.14.14 fedora 20 server and 0.14.14 windows client r8262 builds.

The server-side log with a -d focus for just the event is here (jimador@zapopan:~ is the xterm window title):

2014-12-19 15:52:41,441 ... using XSetInputFocus
2014-12-19 15:52:41,441 ... using WM_TAKE_FOCUS
2014-12-19 15:52:41,441 sending WM_TAKE_FOCUS: 0xc0007f, X11 timestamp=271765636L
2014-12-19 15:52:43,301 codec: MPEG-1 Layer 3 (MP3)
2014-12-19 15:52:49,330 process_focus: wid=0
2014-12-19 15:52:49,330 focus wid=0 has_focus=6
2014-12-19 15:52:49,330 reset_focus() 6 / WindowModel(0xc0007f - "Restore Session - Mozilla Firefox") had focus (toplevel=WorldWindow(0x40001e))
2014-12-19 15:52:49,331 reset_x_focus: widget with focus: None
2014-12-19 15:52:49,331 Take Focus -> world window
2014-12-19 15:52:49,331 sending WM_TAKE_FOCUS: 0x40001e, X11 timestamp=271773525L
2014-12-19 15:52:51,719 process_focus: wid=1
2014-12-19 15:52:51,720 focus wid=1 has_focus=0
2014-12-19 15:52:51,720 focus: giving focus to WindowModel(0x800022 - "jimador@zapopan:~")
2014-12-19 15:52:51,720 focus: will set modified mask to ('mod2',)
2014-12-19 15:52:51,721 Giving focus to 0x800022
2014-12-19 15:52:51,721 ... using XSetInputFocus
2014-12-19 15:52:55,828 process_focus: wid=0
2014-12-19 15:52:55,828 focus wid=0 has_focus=1
2014-12-19 15:52:55,828 reset_focus() 1 / WindowModel(0x800022 - "jimador@zapopan:~") had focus (toplevel=WorldWindow(0x40001e))
2014-12-19 15:52:55,828 reset_x_focus: widget with focus: None
2014-12-19 15:52:55,829 Take Focus -> world window
2014-12-19 15:52:55,829 sending WM_TAKE_FOCUS: 0x40001e, X11 timestamp=271780023L

Client-side:

2014-12-19 15:52:42,118 xpra client version 0.14.14
2014-12-19 15:52:42,710 OpenGL_accelerate module loaded
2014-12-19 15:52:42,710 Using accelerated ArrayDatatype
2014-12-19 15:52:42,805 detected keyboard: layout=us
2014-12-19 15:52:42,805 desktop size is 3840x2160 with 1 screen(s):
2014-12-19 15:52:42,805   '1\WinSta-Default' (1016x571 mm)
2014-12-19 15:52:42,821     DISPLAY1 (621x341 mm)
2014-12-19 15:52:42,898 server: Linux Fedora 20 Heisenbug, Xpra version 0.14.14 (r8262)
2014-12-19 15:52:42,960 Attached to tcp:10.0.32.53:1201 (press Control-C to detach)
2014-12-19 15:52:43,007 focus-in-event for wid=1
2014-12-19 15:52:43,007 GLClientWindow(1 : GLPixmapBacking(1, (499, 316), None)) focus_change((ClientWindow(1), <GParamBoolean 'has-toplevel-focus'>)) has-toplevel-focus=True, _been_mapped=False
2014-12-19 15:52:43,007 focus-out-event for wid=1
2014-12-19 15:52:43,007 GLClientWindow(1 : GLPixmapBacking(1, (499, 316), None)) focus_change((ClientWindow(1), <GParamBoolean 'has-toplevel-focus'>)) has-toplevel-focus=False, _been_mapped=False
2014-12-19 15:52:43,007 focus-in-event for wid=6
2014-12-19 15:52:43,007 GLClientWindow(6 : GLPixmapBacking(6, (1360, 992), None)) focus_change((ClientWindow(6), <GParamBoolean 'has-toplevel-focus'>)) has-toplevel-focus=True, _been_mapped=False
2014-12-19 15:52:43,148 GLClientWindow(1 : GLPixmapBacking(1, (499, 316), None)) focus_change(('initial',)) has-toplevel-focus=False, _been_mapped=True
2014-12-19 15:52:43,148 update_focus(1, False) focused=None, grabbed=None
2014-12-19 15:52:43,148 GLClientWindow(6 : GLPixmapBacking(6, (1360, 992), None)) focus_change(('initial',)) has-toplevel-focus=True, _been_mapped=True
2014-12-19 15:52:43,148 update_focus(6, True) focused=None, grabbed=None
2014-12-19 15:52:43,148 send_focus(6)
2014-12-19 15:52:45,036 using audio codec: MPEG 1 Audio, Layer 3 (MP3)
2014-12-19 15:52:51,022 update_focus(0, False) focused=6, grabbed=None
2014-12-19 15:52:51,022 focus-out-event for wid=6
2014-12-19 15:52:51,022 GLClientWindow(6 : GLPixmapBacking(6, (1360, 992), None)) focus_change((ClientWindow(6), <GParamBoolean 'has-toplevel-focus'>)) has-toplevel-focus=False, _been_mapped=True
2014-12-19 15:52:51,022 update_focus(6, False) focused=None, grabbed=None
2014-12-19 15:52:51,052 send_focus(0)
2014-12-19 15:52:53,440 focus-in-event for wid=1
2014-12-19 15:52:53,440 GLClientWindow(1 : GLPixmapBacking(1, (499, 316), None)) focus_change((ClientWindow(1), <GParamBoolean 'has-toplevel-focus'>)) has-toplevel-focus=True, _been_mapped=True
2014-12-19 15:52:53,440 update_focus(1, True) focused=None, grabbed=None
2014-12-19 15:52:53,440 send_focus(1)
2014-12-19 15:52:56,614 _unfocus() wid=8, focused=1
2014-12-19 15:52:57,519 update_focus(0, False) focused=1, grabbed=None
2014-12-19 15:52:57,519 focus-out-event for wid=1
2014-12-19 15:52:57,536 GLClientWindow(1 : GLPixmapBacking(1, (499, 316), None)) focus_change((ClientWindow(1), <GParamBoolean 'has-toplevel-focus'>)) has-toplevel-focus=False, _been_mapped=True
2014-12-19 15:52:57,536 update_focus(1, False) focused=None, grabbed=None
2014-12-19 15:52:57,552 send_focus(0)
2014-12-19 15:53:06,236 received console event CTRL_C

I neglected to grab an xpra info, however. Let me know if that will help and I can grab that as well.


Sun, 18 Jan 2015 10:39:33 GMT - Antoine Martin: priority changed

Here's a typical firefox tooltip:

process_new_common: [6, 282, 437, 201, 48, {'opacity': -1, 'fullscreen': False, \
    'xid': '0x8021cd', 'pid': 26134, 'window-type': ('TOOLTIP',), \
    'maximized': False, 'transient-for': 2, 'override-redirect': True}], OR=True

So we have an override redirect "TOOLTIP" window which is transient for its parent.

I've made a much simpler test case for this in r8500. This is not a bug in our code, it is probably a bug or limitation of GTK on windows. So I am tempted to just close this ticket as 'wontfix' and rely on the GTK3 port making progress (#90).


Sun, 18 Jan 2015 10:40:25 GMT - Antoine Martin: milestone set


Tue, 12 Jul 2016 16:51:50 GMT - Antoine Martin: milestone changed

Milestone renamed


Sun, 21 Aug 2016 09:55:49 GMT - Antoine Martin: milestone changed

Milestone renamed


Fri, 10 Mar 2017 14:04:52 GMT - Antoine Martin: milestone changed

Could be related to this other GTK focus bug: ticket:469#comment:46.


Wed, 12 Jul 2017 12:24:29 GMT - Antoine Martin: status changed; resolution set

Rather than trying to workaround old GTK2 bugs, let's focus on moving to python3 / GTK3:


Sat, 23 Jan 2021 05:05:11 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/761