Description of problem:
Using GTK (either gtk3-3.14.6 or gtk2-2.24.25) with x11 backend (default in Fedora weven under Wayland session), it's difficult to select items from the combo box because the selection of items does not follow the pointer.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run "GDK_BACKEND=x11 gtk3-demo"
or "GDK_BACKEND=x11 gtk-demo"
2. Choose "Combo boxes from the list"
3. Try to select items in the combo boxes
Only the initial item remains hilighted, even though the selection actually works.
The hilighted item follows the mouse pointer.
The same works with the wayland backend: GDK_BACKEND=wayland gtk3-demo
But not gtk2, the following will not work even with wayland backend: ""
GDK_BACKEND=wayland gtk3-demo => OK
GDK_BACKEND=x11 gtk3-demo => Fail
GDK_BACKEND=wayland gtk-demo => Fail
GDK_BACKEND=x11 gtk-demo => Fail
This makes it impossible to select in cascading menus for example.
if it works under actual X, but not under xwayland, I'd tend to say it is a bug in the X emulation under wayland.
I think you're right, it's not gtk specific and affects different toolkits (gtk2, Motif, Xaw).
There are other similar reports, bug 1148202 and bug 1148020 but these are all closed (although the issue seems to be still there).
Worth noting that the issue occurs only when the mouse button is kept pressed, so menus that rely on "press => select => release" won't work (e.g. Xaw or gtk2 combobox) whereas the menus which can operate with "press => release => select/hover => press => release" do work.
The enter/leave notify events are reported though (as seen with xev) but the detail field may differ, it seems the NotifyNonlinear is not reported in the case of XWayland, I dunno if the toolkits rely on that, but I will check.
Now it gets weird, if the mouse button is pressed, the xany.window field of the events is differs...
gtk uses that to identify the widget associated with the event (I reckon other toolkits do th same), and when a button is pressed, the function gtk_get_event_widget() will return NULL as it can't find the widget matching the events.
Xwayland computes to window event in xwl_xy_to_window() (in hw/xwayland/xwayland-input.c) based on the seat's focus_window.
It appears that the seat's focus_window remains on the window where the mouse button was initially pressed as long as the button is pressed, which explains why the toolkits which rely on the window field of the enter/leave and motion notify events do not update the selected item when the mouse button is kept pressed.
I am not sure if and how this could be fixed though.
Jasper's patch at http://patchwork.freedesktop.org/patch/42742/ should fix this
That patch works better actually: http://patchwork.freedesktop.org/patch/43021/
*** Bug 1188490 has been marked as a duplicate of this bug. ***
I use a kde windows manager .
when I choose gtk+ appearance -> gtk+ style (you need install kcm-gtk to have this option ) -> oxygen-gtk
run Combo boxes from the list
Try to select items in the combo boxes , it freeze all desktop until I press esc ( to return)
(gtk3-demo:3566): Gtk-WARNING **: cannot open display: :0
seems to work
also seems to work
changing gtk+ style -> adwaita
don't have problem .
BTW : I'm try hunting a bug , on rendering graphics that sometimes fails , since the begging of F21 , I found that only happens with gtk+ applications , sometimes one letter of a font disappears , sometime I got corrupt graphics , but a refresh window fix it .
Other where this bug place is visible is on libreoffice characters overlaps , I'm sending a picture in attach .
Created attachment 1025826 [details]
(In reply to Sergio Monteiro Basto from comment #9)
> BTW : I'm try hunting a bug , on rendering graphics that sometimes fails ,
> since the begging of F21 , I found that only happens with gtk+ applications
> , sometimes one letter of a font disappears , sometime I got corrupt
> graphics , but a refresh window fix it .
> Other where this bug place is visible is on libreoffice characters overlaps
> , I'm sending a picture in attach .
I would prefer not to confuse everything, this particular bug 1188289 is about XWayland and override-redirect windows, and there is a known fix available (see comment 7).
Anything else (like libreoffice characters overlaps) would belong to a separate bug.
Created attachment 1025835 [details]
example: one letter of a font disappear
well this bug is the closest thing that I found . But we could ignore my comments, I just wrote to record , I don't know what component is failing , so maybe someone can help me out .
Hi, as this bug is assign to Ajax , I'm writing here because is the closest report that I found and I don't know where to write.
The problems couldn't be the same but, in common, they are in Fedora 21 and with GTK. I investigate a little bit, kde plasma doesn't run on wayland, I have the problems described in #9, #11 and #12 since I upgrade to F21 but I can't find any warning or error message that could give me a clue of what happens. I know for a fact, if I restart X (close session and login again) the problem of missing font characters goes but libreoffice characters overlaps I think don't .
Other common characteristic, only happens with gtk+ applications and both have problems with combo boxes, I even sometimes have some graphics corruptions on apps and changing gtk appearance -> widget style (oxygen , QtCurve or adwaita ) doesn't make any difference .
(In reply to Sergio Monteiro Basto from comment #13)
> Hi, as this bug is assign to Ajax , I'm writing here because is the closest
> report that I found and I don't know where to write.
Please open a different bug for your issue, it definitely sounds like a different problem from this one.
> The problems couldn't be the same but, in common, they are in Fedora 21 and
> with GTK.
Precisely, it's not because it's Fedora and gtk that it has to be *this* bug. One problem, one bug (otherwise we would have only one bug for all existing issues, wouldn't be very practical, would it?).
> I investigate a little bit, kde plasma doesn't run on wayland, I
> have the problems described in #9, #11 and #12 since I upgrade to F21 but I
> can't find any warning or error message that could give me a clue of what
> happens. I know for a fact, if I restart X (close session and login again)
> the problem of missing font characters goes but libreoffice characters
> overlaps I think don't .
Definitely a different issue. Trying to hijack a particular bug with a fix available already won't drive your issue to resolution any faster, quite the opposite as it just adds confusion.
> Other common characteristic, only happens with gtk+ applications and both
> have problems with combo boxes, I even sometimes have some graphics
> corruptions on apps and changing gtk appearance -> widget style (oxygen ,
> QtCurve or adwaita ) doesn't make any difference .
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 21 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.