summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-06-12 01:03:35 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-06-12 01:03:35 +0300
commit01f8a08cb0eb5eb51aad78ed648d53627604d578 (patch)
tree86d53c8fa069cb25e6628eb71064456ed6ece44b
parent5177aaf64dc612ba39d38beadb686acf6285322c (diff)
downloadmetacity-01f8a08cb0eb5eb51aad78ed648d53627604d578.tar.gz
frames: use default screen
-rw-r--r--src/ui/frames.c7
-rw-r--r--src/ui/frames.h2
-rw-r--r--src/ui/ui.c3
3 files changed, 4 insertions, 8 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 7b557356..7ab299bd 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 9b55510e..251e6421 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 1834a1f5..5b2978b3 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