After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743266 - Mouse panel fixes for non-X11 backends
Mouse panel fixes for non-X11 backends
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-20 20:21 UTC by Rui Matos
Modified: 2017-06-27 21:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
common: Fix device manager backend check (1.30 KB, patch)
2015-01-20 20:21 UTC, Rui Matos
rejected Details | Review
mouse: Check synaptics capabilities only on X11 (1.38 KB, patch)
2015-01-20 20:21 UTC, Rui Matos
committed Details | Review
mouse: Use GsdDeviceManager to check for device type presence (5.62 KB, patch)
2015-01-20 20:21 UTC, Rui Matos
committed Details | Review
common: Update commit message prefix for "update-from-gsd" (863 bytes, patch)
2015-01-21 12:15 UTC, Bastien Nocera
committed Details | Review
common: Update from gnome-settings-daemon (1.07 KB, patch)
2015-01-21 12:15 UTC, Bastien Nocera
committed Details | Review
common: Fix build by providing dummy header (1.19 KB, patch)
2015-01-21 12:15 UTC, Bastien Nocera
committed Details | Review
common: Fix build on non-Linux systems (891 bytes, patch)
2015-01-22 14:50 UTC, Bastien Nocera
committed Details | Review

Description Rui Matos 2015-01-20 20:21:06 UTC
see patches
Comment 1 Rui Matos 2015-01-20 20:21:09 UTC
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!).
Comment 2 Rui Matos 2015-01-20 20:21:13 UTC
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.
Comment 3 Rui Matos 2015-01-20 20:21:18 UTC
Created attachment 295047 [details] [review]
mouse: Use GsdDeviceManager to check for device type presence

This allows us to work on non-X11 backends.
Comment 4 Bastien Nocera 2015-01-20 20:35:26 UTC
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.
Comment 5 Bastien Nocera 2015-01-20 20:36:54 UTC
Review of attachment 295046 [details] [review]:

Fine by me.
Comment 6 Bastien Nocera 2015-01-20 20:39:11 UTC
Review of attachment 295047 [details] [review]:

Looks good.
Comment 7 Rui Matos 2015-01-20 22:20:13 UTC
(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.
Comment 8 Bastien Nocera 2015-01-21 12:13:52 UTC
(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...).
Comment 9 Bastien Nocera 2015-01-21 12:15:22 UTC
Created attachment 295085 [details] [review]
common: Update commit message prefix for "update-from-gsd"
Comment 10 Bastien Nocera 2015-01-21 12:15:28 UTC
Created attachment 295086 [details] [review]
common: Update from gnome-settings-daemon
Comment 11 Bastien Nocera 2015-01-21 12:15:34 UTC
Created attachment 295087 [details] [review]
common: Fix build by providing dummy header
Comment 12 Rui Matos 2015-01-21 12:26:41 UTC
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.
Comment 13 Rui Matos 2015-01-21 12:26:59 UTC
Review of attachment 295085 [details] [review]:

sure
Comment 14 Rui Matos 2015-01-21 12:27:03 UTC
Review of attachment 295086 [details] [review]:

ok
Comment 15 Rui Matos 2015-01-21 13:33:20 UTC
[ 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
Comment 16 Ting-Wei Lan 2015-01-21 18:56:25 UTC
(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'
Comment 17 Bastien Nocera 2015-01-22 14:50:32 UTC
Created attachment 295185 [details] [review]
common: Fix build on non-Linux systems

Only define HAVE_WAYLAND when GDK_WINDOWING_WAYLAND is defined.
Comment 18 Rui Matos 2015-01-22 14:57:56 UTC
Review of attachment 295185 [details] [review]:

yeah, ok
Comment 19 Bastien Nocera 2015-01-25 13:07:47 UTC
Attachment 295185 [details] pushed as 9140b47 - common: Fix build on non-Linux systems
Comment 20 Michael Biebl 2017-06-24 13:44:50 UTC
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?
Comment 21 Bastien Nocera 2017-06-24 13:49:08 UTC
(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 )
Comment 22 Michael Biebl 2017-06-24 13:58:14 UTC
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.
Comment 23 Bastien Nocera 2017-06-24 14:13:36 UTC
(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.
Comment 24 Michael Biebl 2017-06-24 14:14:32 UTC
Bastien, if you don't want to help, feel free to not reply. Thanks
Comment 25 Bastien Nocera 2017-06-24 14:19:24 UTC
(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.
Comment 26 Michael Biebl 2017-06-27 21:27:45 UTC
(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