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 698929 - Remove deprecated call to gdk_display_get_n_screens
Remove deprecated call to gdk_display_get_n_screens
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: wacom
unspecified
Other All
: Normal normal
: ---
Assigned To: Joaquim Rocha
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-26 09:42 UTC by Joaquim Rocha
Modified: 2013-05-15 08:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wacom: Remove deprecated call to gdk_display_get_n_screens (2.83 KB, patch)
2013-04-26 09:42 UTC, Joaquim Rocha
needs-work Details | Review
wacom: Remove deprecated call to gdk_display_get_n_screens (8.43 KB, patch)
2013-04-30 14:02 UTC, Joaquim Rocha
reviewed Details | Review
wacom: Remove deprecated call to gdk_display_get_n_screens (8.62 KB, patch)
2013-05-14 11:25 UTC, Joaquim Rocha
accepted-commit_now Details | Review

Description Joaquim Rocha 2013-04-26 09:42:04 UTC
There is a call to this function in wacom and other plugins.
If you want, I can provide patches to fix all of them as this is pretty simple.
Comment 1 Joaquim Rocha 2013-04-26 09:42:06 UTC
Created attachment 242528 [details] [review]
wacom: Remove deprecated call to gdk_display_get_n_screens

Also skips using the display to get the default screen.
Comment 2 Bastien Nocera 2013-04-26 10:27:19 UTC
Review of attachment 242528 [details] [review]:

::: plugins/wacom/gsd-wacom-manager.c
@@ +1419,3 @@
+                return;
+        }
+        manager->priv->screens = g_slist_append (manager->priv->screens, screen);

why do we keep lists if there's only ever going to be one member?

@@ +1432,2 @@
         }
+        manager->priv->rr_screens = g_list_prepend (manager->priv->rr_screens, rr_screen);

Ditto.
Comment 3 Joaquim Rocha 2013-04-30 14:02:37 UTC
Created attachment 242914 [details] [review]
wacom: Remove deprecated call to gdk_display_get_n_screens

Hadn't noticed the GLists... Updated patch.
Comment 4 Bastien Nocera 2013-05-13 09:23:49 UTC
Review of attachment 242914 [details] [review]:

::: plugins/common/gsd-keygrab.h
@@ -51,3 @@
 void            grab_button      (int      deviceid,
                                   gboolean grab,
-                                  GSList  *screens);

Can you please re-indent?

::: plugins/wacom/gsd-wacom-manager.c
@@ +1419,3 @@
+
+        /*
+         * We also keep a list of GnomeRRScreen to monitor changes such as rotation

We don't...
Comment 5 Joaquim Rocha 2013-05-14 11:25:26 UTC
Created attachment 244155 [details] [review]
wacom: Remove deprecated call to gdk_display_get_n_screens

New version addressing the latest comments.
Comment 6 Bastien Nocera 2013-05-14 13:51:53 UTC
Review of attachment 244155 [details] [review]:

Feel free to commit after that.

::: plugins/wacom/gsd-wacom-manager.c
@@ +1533,3 @@
         }
 
+	if (wacom_manager->priv->rr_screen != NULL) {

g_clear_object();
Comment 7 Joaquim Rocha 2013-05-15 08:04:46 UTC
Pushed with the last comment's changes.