[metacity] resizepopup: use default screen
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity] resizepopup: use default screen
- Date: Sat, 11 Jun 2016 22:56:20 +0000 (UTC)
commit cf4514367bea73a8464aec1befdbb3edff9795b7
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Jun 12 00:55:10 2016 +0300
resizepopup: use default screen
src/core/window.c | 3 +--
src/include/resizepopup.h | 3 +--
src/ui/resizepopup.c | 9 +++------
3 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index d76ff0a..9b39976 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -8058,8 +8058,7 @@ meta_window_refresh_resize_popup (MetaWindow *window)
if (window->size_hints.width_inc > 1 ||
window->size_hints.height_inc > 1)
window->display->grab_resize_popup =
- meta_ui_resize_popup_new (window->display->xdisplay,
- window->screen->number);
+ meta_ui_resize_popup_new (window->display->xdisplay);
}
if (window->display->grab_resize_popup != NULL)
diff --git a/src/include/resizepopup.h b/src/include/resizepopup.h
index d68c97c..54be8c7 100644
--- a/src/include/resizepopup.h
+++ b/src/include/resizepopup.h
@@ -29,8 +29,7 @@
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
-MetaResizePopup* meta_ui_resize_popup_new (Display *display,
- int screen_number);
+MetaResizePopup *meta_ui_resize_popup_new (Display *display);
void meta_ui_resize_popup_free (MetaResizePopup *popup);
void meta_ui_resize_popup_set (MetaResizePopup *popup,
MetaRectangle rect,
diff --git a/src/ui/resizepopup.c b/src/ui/resizepopup.c
index f0c7a08..b0f5616 100644
--- a/src/ui/resizepopup.c
+++ b/src/ui/resizepopup.c
@@ -30,7 +30,6 @@ struct _MetaResizePopup
GtkWidget *size_window;
GtkWidget *size_label;
Display *display;
- int screen_number;
int vertical_size;
int horizontal_size;
@@ -41,15 +40,13 @@ struct _MetaResizePopup
};
MetaResizePopup*
-meta_ui_resize_popup_new (Display *display,
- int screen_number)
+meta_ui_resize_popup_new (Display *display)
{
MetaResizePopup *popup;
popup = g_new0 (MetaResizePopup, 1);
popup->display = display;
- popup->screen_number = screen_number;
return popup;
}
@@ -93,8 +90,8 @@ ensure_size_window (MetaResizePopup *popup)
return;
popup->size_window = gtk_window_new (GTK_WINDOW_POPUP);
- screen = gdk_display_get_screen (gdk_x11_lookup_xdisplay (popup->display),
- popup->screen_number);
+
+ screen = gdk_screen_get_default ();
visual = gdk_screen_get_rgba_visual (screen);
gtk_window_set_screen (GTK_WINDOW (popup->size_window), screen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]