[metacity] ui: use default screen



commit ae74b9a5ba8d972358f9dad13653c80c795e7c67
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Jun 12 01:07:58 2016 +0300

    ui: use default screen

 src/core/frame.c |    3 +--
 src/include/ui.h |   14 +++++++-------
 src/ui/ui.c      |   16 +++++++---------
 3 files changed, 15 insertions(+), 18 deletions(-)
---
diff --git a/src/core/frame.c b/src/core/frame.c
index 55fdb42..74f8ed0 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -117,8 +117,7 @@ meta_window_ensure_frame (MetaWindow *window)
                                                 frame->rect.x,
                                                 frame->rect.y,
                                                 frame->rect.width,
-                                                frame->rect.height,
-                                                frame->window->screen->number);
+                                                frame->rect.height);
 
   meta_verbose ("Frame for %s is 0x%lx\n", frame->window->desc, frame->xwindow);
   attrs.event_mask = EVENT_MASK;
diff --git a/src/include/ui.h b/src/include/ui.h
index 7be0c9f..f1728d3 100644
--- a/src/include/ui.h
+++ b/src/include/ui.h
@@ -76,14 +76,14 @@ void meta_ui_get_frame_mask (MetaUI  *ui,
                              guint    height,
                              cairo_t *cr);
 
-Window meta_ui_create_frame_window (MetaUI *ui,
+Window meta_ui_create_frame_window (MetaUI  *ui,
                                     Display *xdisplay,
-                                    Visual *xvisual,
-                                   gint x,
-                                   gint y,
-                                   gint width,
-                                   gint height,
-                                   gint screen_no);
+                                    Visual  *xvisual,
+                                    gint     x,
+                                    gint     y,
+                                    gint     width,
+                                    gint     height);
+
 void meta_ui_destroy_frame_window (MetaUI *ui,
                                   Window  xwindow);
 void meta_ui_move_resize_frame (MetaUI *ui,
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 5b2978b..9a390a4 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -355,17 +355,15 @@ set_background_none (Display *xdisplay,
 }
 
 Window
-meta_ui_create_frame_window (MetaUI *ui,
+meta_ui_create_frame_window (MetaUI  *ui,
                              Display *xdisplay,
-                             Visual *xvisual,
-                            gint x,
-                            gint y,
-                            gint width,
-                            gint height,
-                            gint screen_no)
-{
-  GdkDisplay *display = gdk_x11_lookup_xdisplay (xdisplay);
-  GdkScreen *screen = gdk_display_get_screen (display, screen_no);
+                             Visual  *xvisual,
+                             gint     x,
+                             gint     y,
+                             gint     width,
+                             gint     height)
+{
+  GdkScreen *screen = gdk_screen_get_default ();
   GdkWindowAttr attrs;
   gint attributes_mask;
   GdkWindow *window;


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