[metacity] frames: use default screen



commit 01f8a08cb0eb5eb51aad78ed648d53627604d578
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Jun 12 01:03:35 2016 +0300

    frames: use default screen

 src/ui/frames.c |    7 +------
 src/ui/frames.h |    2 +-
 src/ui/ui.c     |    3 ++-
 3 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 7b55735..7ab299b 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -421,16 +421,11 @@ meta_frames_calc_geometry (MetaFrames        *frames,
 }
 
 MetaFrames*
-meta_frames_new (int screen_number)
+meta_frames_new (void)
 {
-  GdkScreen *screen;
   MetaFrames *frames;
 
-  screen = gdk_display_get_screen (gdk_display_get_default (),
-                                   screen_number);
-
   frames = g_object_new (META_TYPE_FRAMES,
-                         "screen", screen,
                          "type", GTK_WINDOW_POPUP,
                          NULL);
 
diff --git a/src/ui/frames.h b/src/ui/frames.h
index 9b55510..251e642 100644
--- a/src/ui/frames.h
+++ b/src/ui/frames.h
@@ -76,7 +76,7 @@ struct _MetaUIFrame
   MetaFrameControl prelit_control;
 };
 
-MetaFrames *meta_frames_new (int screen_number);
+MetaFrames *meta_frames_new (void);
 
 void meta_frames_manage_window (MetaFrames *frames,
                                 Window      xwindow,
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 1834a1f..5b2978b 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -297,7 +297,8 @@ meta_ui_new (Display *xdisplay,
   g_assert (gdisplay == gdk_display_get_default ());
 
   g_assert (xdisplay == GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
-  ui->frames = meta_frames_new (XScreenNumberOfScreen (screen));
+  ui->frames = meta_frames_new ();
+
   /* GTK+ needs the frame-sync protocol to work in order to properly
    * handle style changes. This means that the dummy widget we create
    * to get the style for title bars actually needs to be mapped


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