[gtk+] window: Stop using screen width/height
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: Stop using screen width/height
- Date: Thu, 28 Apr 2016 03:19:59 +0000 (UTC)
commit f5d6688d3e3525e9d61e1155ae8ac0318af2290a
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 10 23:45:11 2016 -0400
window: Stop using screen width/height
gtk/gtkwindow.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 7e62c59..8284fb2 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -9382,8 +9382,6 @@ gtk_window_compute_configure_request (GtkWindow *window,
case GTK_WIN_POS_MOUSE:
{
- gint screen_width = gdk_screen_get_width (screen);
- gint screen_height = gdk_screen_get_height (screen);
GdkRectangle area;
GdkDisplay *display;
GdkDevice *pointer;
@@ -9398,18 +9396,12 @@ gtk_window_compute_configure_request (GtkWindow *window,
x = px - w / 2;
y = py - h / 2;
- x = CLAMP (x, 0, screen_width - w);
- y = CLAMP (y, 0, screen_height - h);
/* Clamp onto current monitor, ignoring _NET_WM_STRUT and
- * WM decorations. Don't try to figure out what's going
- * on if the mouse wasn't inside a monitor.
+ * WM decorations.
*/
- if (monitor != NULL)
- {
- gdk_monitor_get_geometry (monitor, &area);
- clamp_window_to_rectangle (&x, &y, w, h, &area);
- }
+ gdk_monitor_get_geometry (monitor, &area);
+ clamp_window_to_rectangle (&x, &y, w, h, &area);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]