Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
totaam opened this issue Dec 10, 2014 · 21 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 10, 2014

Issue migrated from trac ticket # 761

component: client | priority: minor | resolution: wontfix | keywords: win32

2014-12-10 10:15:16: peterlong0210 created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Dec 10, 2014

2014-12-10 10:16:57: peterlong0210 uploaded file focus.jpg (70.0 KiB)

focus.jpg

@totaam
Copy link
Collaborator Author

totaam commented Dec 10, 2014

2014-12-10 10:26:46: peterlong0210 commented


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

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2014

2014-12-11 02:00:51: peterlong0210 changed owner from antoine to **

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2014

2014-12-11 02:00:51: peterlong0210 commented


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

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2014

2014-12-11 02:01:30: peterlong0210 changed owner from ** to antoine

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2014

2014-12-11 18:59:36: antoine changed owner from antoine to peterlong0210

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2014

2014-12-11 18:59:36: antoine commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2014

2014-12-11 20:39:42: antoine changed title from Activate window change when a tooltip from mouse pointer appear to hovering on a window sitting in the background can cause it to be raised when a tooltip is shown

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2014

2014-12-11 20:39:42: antoine commented


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

Please provide logs.

@totaam
Copy link
Collaborator Author

totaam commented Dec 12, 2014

2014-12-12 01:13:25: peterlong0210 uploaded file logs.txt (3.5 KiB)

Reproduce ticket #761

@totaam
Copy link
Collaborator Author

totaam commented Dec 12, 2014

2014-12-12 01:22:39: peterlong0210 changed owner from peterlong0210 to antoine

@totaam
Copy link
Collaborator Author

totaam commented Dec 12, 2014

2014-12-12 01:22:39: peterlong0210 commented


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.

@totaam
Copy link
Collaborator Author

totaam commented Dec 20, 2014

2014-12-20 00:04:50: afarr commented


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](../commit/dce0bf487085507439bf131ff6a23b3b25c08da7))
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.

@totaam
Copy link
Collaborator Author

totaam commented Jan 18, 2015

2015-01-18 10:39:34: totaam changed priority from major to minor

@totaam
Copy link
Collaborator Author

totaam commented Jan 18, 2015

2015-01-18 10:39:34: totaam commented


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).

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 17:51:51: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Aug 21, 2016

2016-08-21 10:55:50: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Mar 10, 2017

2017-03-10 14:04:53: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2017

2017-07-12 13:24:30: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2017

2017-07-12 13:24:30: antoine set resolution to wontfix

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2017

2017-07-12 13:24:30: antoine commented


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant