[gtk+] gdk/directfb: cursor size is artificially limited



commit 12edc32d95ddbb40182c16f088156d322781ebe9
Author: André Draszik <gtk andred net>
Date:   Sun Sep 13 14:11:49 2009 +0100

    gdk/directfb: cursor size is artificially limited
    
    Cursor sizes in DirectFB can be large (4095x4095), limit to 128x128
    though, because the x11 backend has this limit, too - for max.
    compatibility.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=609201
    
    Signed-off-by: Javier Jardón <jjardon gnome org>

 gdk/directfb/gdkcursor-directfb.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gdk/directfb/gdkcursor-directfb.c b/gdk/directfb/gdkcursor-directfb.c
index 57433a4..f5d9a19 100644
--- a/gdk/directfb/gdkcursor-directfb.c
+++ b/gdk/directfb/gdkcursor-directfb.c
@@ -490,8 +490,10 @@ gdk_cursor_get_display (GdkCursor *cursor)
 }
 
 guint
-gdk_display_get_default_cursor_size (GdkDisplay    *display)
+gdk_display_get_default_cursor_size (GdkDisplay *display)
 {
+  g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
+
   return 16;
 }
 
@@ -510,8 +512,12 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display,
                                      guint       *width,
                                      guint       *height)
 {
-  *width=gdk_display_get_default_cursor_size(display);
-  *height=*width;
+  g_return_if_fail (GDK_IS_DISPLAY (display));
+
+  /* Cursor sizes in DirectFB can be large (4095x4095), but we limit this to
+     128x128 for max compatibility with the x11 backend. */
+  *width = 128;
+  *height = 128;
 }
 
 /**



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