GNOME Bugzilla – Bug 743266
Mouse panel fixes for non-X11 backends
Last modified: 2017-06-27 21:27:45 UTC
see patches
Created attachment 295045 [details] [review] common: Fix device manager backend check We don't have a HAVE_WAYLAND definition in g-c-c but we can just look at the type of GdkDisplay (not GdkScreen!).
Created attachment 295046 [details] [review] mouse: Check synaptics capabilities only on X11 On other backends we don't have a way to check for synaptics capabilities so we just show all the touchpad knobs there.
Created attachment 295047 [details] [review] mouse: Use GsdDeviceManager to check for device type presence This allows us to work on non-X11 backends.
Review of attachment 295045 [details] [review]: I'd rather we added the one-liner to always define it in configure.ac, to avoid it deviating from the g-s-d version.
Review of attachment 295046 [details] [review]: Fine by me.
Review of attachment 295047 [details] [review]: Looks good.
(In reply to comment #4) > Review of attachment 295045 [details] [review]: > > I'd rather we added the one-liner to always define it in configure.ac, to avoid > it deviating from the g-s-d version. Would you really prefer a bogus AC_DEFINE (HAVE_WAYLAND) ? Note that the code here is already necessarily different from g-s-d so you already have that problem. It needs to, because g-s-d has to force the X11 gdk backend and then checks if it's running in a wayland session by attempting to connect to a wayland server. g-c-c doesn't need any of that so we can just do the common place if (GDK_IS_X11_DISPLAY ()) check.
(In reply to comment #7) > (In reply to comment #4) > > Review of attachment 295045 [details] [review] [details]: > > > > I'd rather we added the one-liner to always define it in configure.ac, to avoid > > it deviating from the g-s-d version. > > Would you really prefer a bogus AC_DEFINE (HAVE_WAYLAND) ? > > Note that the code here is already necessarily different from g-s-d so you > already have that problem. It needs to, because g-s-d has to force the X11 gdk > backend and then checks if it's running in a wayland session by attempting to > connect to a wayland server. g-c-c doesn't need any of that so we can just do > the common place if (GDK_IS_X11_DISPLAY ()) check. The patches below show that we can continue doing cut'n'paste (until we remove it all...).
Created attachment 295085 [details] [review] common: Update commit message prefix for "update-from-gsd"
Created attachment 295086 [details] [review] common: Update from gnome-settings-daemon
Created attachment 295087 [details] [review] common: Fix build by providing dummy header
Review of attachment 295087 [details] [review]: Ok, this works too. I generally prefer not to obfuscate code like this but in this case it's probably worth it.
Review of attachment 295085 [details] [review]: sure
Review of attachment 295086 [details] [review]: ok
[ git-bz hiccuped ] I had to fix the stub a bit harder to define HAVE_WAYLAND and a gnome_settings_is_wayland() that actually works. Attachment 295046 [details] pushed as d341f77 - mouse: Check synaptics capabilities only on X11 Attachment 295047 [details] pushed as 0ae0f4a - mouse: Use GsdDeviceManager to check for device type presence Attachment 295085 [details] pushed as fcbdf92 - common: Update commit message prefix for "update-from-gsd" Attachment 295086 [details] pushed as 1be3811 - common: Update from gnome-settings-daemon Attachment 295087 [details] pushed as 3c41d02 - common: Fix build by providing dummy header
(In reply to comment #15) > Attachment 295087 [details] pushed as 3c41d02 - common: Fix build by providing dummy > header The attachment is not the same as the commit. `#define HAVE_WAYLAND 1' causes linking problem when udev is disabled. ../panels/mouse/.libs/libmouse-properties.a(gsd-device-manager.o): In function `gsd_device_manager_get': /panels/common/gsd-device-manager.c:270: undefined reference to `gsd_udev_device_manager_get_type'
Created attachment 295185 [details] [review] common: Fix build on non-Linux systems Only define HAVE_WAYLAND when GDK_WINDOWING_WAYLAND is defined.
Review of attachment 295185 [details] [review]: yeah, ok
Attachment 295185 [details] pushed as 9140b47 - common: Fix build on non-Linux systems
Sorry for resurrecting this old bug, but it seems the synaptics detection is not working here. If I have xserver-xorg-input-synaptics installed in Debian stretch, I don't get the warning that synaptics is in use and libinput should be used instead. cc_synaptics_check() always returns false. It seems this condition: if ((XIGetProperty (display, gdk_x11_device_get_id (device), prop, 0, 2, False, XA_INTEGER, &realtype, &realformat, &nitems, &bytes_after, &data) == Success) && (realtype != None)) { is never true here @Rui: any idea what's going wrong?
(In reply to Michael Biebl from comment #20) > Sorry for resurrecting this old bug, Don't, file a new bug. Note that Synaptics support was completely removed in GNOME 3.20. (on the Debian list: http://thread.gmane.org/gmane.linux.debian.devel.x/122269/focus=209864 )
I'm well aware of synaptics support having been removed. That's why it's even more important that users still having the synaptics driver installed see that warning message.
(In reply to Michael Biebl from comment #22) > I'm well aware of synaptics support having been removed. That's why it's > even more important that users still having the synaptics driver installed > see that warning message. No. It means that you need to fix the problem in your packaging so that the synaptics driver is never loaded for X11 GNOME sessions. It's a distribution problem now.
Bastien, if you don't want to help, feel free to not reply. Thanks
(In reply to Michael Biebl from comment #24) > Bastien, if you don't want to help, feel free to not reply. Thanks I already told you to file a new bug, I'm not sure why you insist on replying in this one.
(In reply to Bastien Nocera from comment #25) > I already told you to file a new bug, I'm not sure why you insist on > replying in this one. You are right. Apologies. I've filed https://bugzilla.gnome.org/show_bug.cgi?id=784266