[metacity] ui: avoid a deprecation warning



commit 451781175cec8a485bb5622da49f8a94d3db4acc
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Oct 26 01:34:05 2016 +0300

    ui: avoid a deprecation warning

 src/core/display.c |    2 +-
 src/include/ui.h   |    2 --
 src/ui/ui.c        |    6 ------
 3 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 4de0c15..2bd702a 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -667,7 +667,7 @@ meta_display_open (void)
 
   screens = NULL;
 
-  i = meta_ui_get_screen_number ();
+  i = XDefaultScreen (the_display->xdisplay);
   screen = meta_screen_new (the_display, i, timestamp);
 
   if (screen)
diff --git a/src/include/ui.h b/src/include/ui.h
index 3607810..3dd823d 100644
--- a/src/include/ui.h
+++ b/src/include/ui.h
@@ -49,8 +49,6 @@ void meta_ui_init (int *argc, char ***argv);
 
 Display* meta_ui_get_display (void);
 
-gint     meta_ui_get_screen_number (void);
-
 void meta_ui_add_event_func    (Display       *xdisplay,
                                 MetaEventFunc  func,
                                 gpointer       data);
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 42b5c03..aeba136 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -88,12 +88,6 @@ meta_ui_get_display (void)
   return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
 }
 
-gint
-meta_ui_get_screen_number (void)
-{
-  return gdk_screen_get_number (gdk_screen_get_default ());
-}
-
 /* We do some of our event handling in frames.c, which expects
  * GDK events delivered by GTK+.  However, since the transition to
  * client side windows, we can't let GDK see button events, since the


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]