[gtk+/wip/otte/gtk4: 17/121] gdk: Insist axis.min_value < axis.max_value



commit 99b27c7561b9bdcc135d57ae3237c0a946bc8f4d
Author: Benjamin Otte <otte redhat com>
Date:   Fri Sep 9 14:49:12 2016 +0200

    gdk: Insist axis.min_value < axis.max_value
    
    Remove fallback code that would substitute screen size otherwise.

 gdk/gdkdevice.c |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index 9f0c6e2..e489d5a 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -1708,21 +1708,8 @@ _gdk_device_translate_window_coord (GdkDevice *device,
   device_width = axis_info_x->max_value - axis_info_x->min_value;
   device_height = axis_info_y->max_value - axis_info_y->min_value;
 
-  if (device_width > 0)
-    x_min = axis_info_x->min_value;
-  else
-    {
-      device_width = gdk_screen_get_width (gdk_window_get_screen (window));
-      x_min = 0;
-    }
-
-  if (device_height > 0)
-    y_min = axis_info_y->min_value;
-  else
-    {
-      device_height = gdk_screen_get_height (gdk_window_get_screen (window));
-      y_min = 0;
-    }
+  x_min = axis_info_x->min_value;
+  y_min = axis_info_y->min_value;
 
   window_width = gdk_window_get_width (window);
   window_height = gdk_window_get_height (window);


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