[Xfce4-commits] [xfce/thunar] 05/06: Replace gdk_monitor_get_geometry

noreply at xfce.org noreply at xfce.org
Sat Jun 2 06:52:28 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit 9903923828e50ddce969252e696d59e69f9803fc
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sat Jun 2 01:49:18 2018 -0300

    Replace gdk_monitor_get_geometry
---
 thunar/thunar-preferences-dialog.c | 6 +++---
 thunar/thunar-window.c             | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/thunar/thunar-preferences-dialog.c b/thunar/thunar-preferences-dialog.c
index 7a1f9c1..dd19f6d 100644
--- a/thunar/thunar-preferences-dialog.c
+++ b/thunar/thunar-preferences-dialog.c
@@ -754,7 +754,7 @@ thunar_preferences_dialog_new (GtkWindow *parent)
   gint          root_x, root_y;
   gint          window_width, window_height;
   gint          dialog_width, dialog_height;
-  gint          monitor;
+  GdkMonitor *  monitor;
   GdkRectangle  geometry;
   GdkScreen    *screen;
 
@@ -774,8 +774,8 @@ thunar_preferences_dialog_new (GtkWindow *parent)
       gtk_window_get_size (GTK_WINDOW (dialog), &dialog_width, &dialog_height);
 
       /* get the monitor geometry of the monitor with the parent window */
-      monitor = gdk_screen_get_monitor_at_point (screen, root_x, root_y);
-      gdk_screen_get_monitor_geometry (screen, monitor, &geometry);
+      monitor = gdk_display_get_monitor_at_point (gdk_display_get_default (), root_x, root_y);
+      gdk_monitor_get_geometry (monitor, &geometry);
 
       /* center the dialog on the window and clamp on the monitor */
       root_x += (window_width - dialog_width) / 2;
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 25ff9cd..e0d0cf9 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -1731,7 +1731,7 @@ thunar_window_notebook_create_window (GtkWidget    *notebook,
   GtkWidget         *new_window;
   ThunarApplication *application;
   gint               width, height;
-  gint               monitor_num;
+  GdkMonitor        *monitor;
   GdkScreen         *screen;
   GdkRectangle       geo;
 
@@ -1758,8 +1758,8 @@ thunar_window_notebook_create_window (GtkWidget    *notebook,
   if (x >= 0 && y >= 0)
     {
       /* get the monitor geometry */
-      monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
-      gdk_screen_get_monitor_geometry (screen, monitor_num, &geo);
+      monitor = gdk_display_get_monitor_at_point (gdk_display_get_default (), x, y);
+      gdk_monitor_get_geometry (monitor, &geo);
 
       /* calculate window position, but keep it on the current monitor */
       x = CLAMP (x - width / 2, geo.x, geo.x + geo.width - width);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list