[metacity] tile-preview: use default screen



commit 5177aaf64dc612ba39d38beadb686acf6285322c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Jun 12 00:57:52 2016 +0300

    tile-preview: use default screen

 src/core/screen.c          |    3 +--
 src/include/tile-preview.h |    3 +--
 src/ui/tile-preview.c      |    5 ++---
 3 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index f3f50e9..9877fc5 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1462,8 +1462,7 @@ meta_screen_tile_preview_update_timeout (gpointer data)
   screen->tile_preview_timeout_id = 0;
 
   if (!screen->tile_preview)
-    screen->tile_preview = meta_tile_preview_new (screen->number,
-                                                  composited);
+    screen->tile_preview = meta_tile_preview_new (composited);
 
   if (window)
     {
diff --git a/src/include/tile-preview.h b/src/include/tile-preview.h
index ae52c0d..bb7029e 100644
--- a/src/include/tile-preview.h
+++ b/src/include/tile-preview.h
@@ -25,8 +25,7 @@
 
 typedef struct _MetaTilePreview MetaTilePreview;
 
-MetaTilePreview   *meta_tile_preview_new    (int                screen_number,
-                                             gboolean           composited);
+MetaTilePreview   *meta_tile_preview_new    (gboolean           composited);
 void               meta_tile_preview_free   (MetaTilePreview   *preview);
 void               meta_tile_preview_show   (MetaTilePreview   *preview,
                                              MetaRectangle     *rect);
diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c
index 37b6412..be3b2b5 100644
--- a/src/ui/tile-preview.c
+++ b/src/ui/tile-preview.c
@@ -129,14 +129,13 @@ meta_tile_preview_composited_changed (GtkWidget *widget,
 }
 
 MetaTilePreview *
-meta_tile_preview_new (int      screen_number,
-                       gboolean composited)
+meta_tile_preview_new (gboolean composited)
 {
   MetaTilePreview *preview;
   GdkVisual *visual;
   GdkScreen *screen;
 
-  screen = gdk_display_get_screen (gdk_display_get_default (), screen_number);
+  screen = gdk_screen_get_default ();
   visual = gdk_screen_get_rgba_visual (screen);
 
   preview = g_new (MetaTilePreview, 1);


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