From 77e830d59bad23a90c79aa220a64d24be5634826 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 29 Nov 2012 11:28:23 -0700 Subject: [PATCH] Punt deprecated gdk_window_get_pointer. --- src/gtk/Includes/gdkwindow.cdecl | 2 +- src/gtk/fix-layout.scm | 15 ++++++--------- src/gtk/gtk-ev.scm | 3 ++- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/gtk/Includes/gdkwindow.cdecl b/src/gtk/Includes/gdkwindow.cdecl index c53ac3721..639d9656b 100644 --- a/src/gtk/Includes/gdkwindow.cdecl +++ b/src/gtk/Includes/gdkwindow.cdecl @@ -145,7 +145,7 @@ gdk/gdkwindow.h |# (window (* GdkWindow)) (rgba (* GdkRGBA))) -(extern (* GdkWindow) gdk_window_get_pointer +#;(extern (* GdkWindow) gdk_window_get_pointer (window (* GdkWindow)) (x (* gint)) (y (* gint)) diff --git a/src/gtk/fix-layout.scm b/src/gtk/fix-layout.scm index a99e066ae..ee2c01542 100644 --- a/src/gtk/fix-layout.scm +++ b/src/gtk/fix-layout.scm @@ -260,16 +260,13 @@ USA. (guarantee-fix-widget widget 'set-fix-widget-motion-handler!) (guarantee-procedure-of-arity handler 4 'set-fix-widget-motion-handler!) (vector-set! - (fix-widget-event-handlers widget) (C-enum "GDK_MOTION_NOTIFY") + (fix-widget-event-handlers widget) + (C-enum "GDK_MOTION_NOTIFY") (named-lambda (fix-widget-motion-handler widget GdkEvent) - (let ((handled? - (handler widget - (->modifiers (C-> GdkEvent "GdkEventMotion state")) - (floor->exact (C-> GdkEvent "GdkEventMotion x")) - (floor->exact (C-> GdkEvent "GdkEventMotion y"))))) - (C-call "gdk_window_get_pointer" #f - (C-> GdkEvent "GdkEventMotion window") 0 0 0) - handled?)))) + (handler widget + (->modifiers (C-> GdkEvent "GdkEventMotion state")) + (floor->exact (C-> GdkEvent "GdkEventMotion x")) + (floor->exact (C-> GdkEvent "GdkEventMotion y")))))) (define ->modifiers (let ((names (make-vector 32 #f))) diff --git a/src/gtk/gtk-ev.scm b/src/gtk/gtk-ev.scm index bc7e027a9..a77614371 100644 --- a/src/gtk/gtk-ev.scm +++ b/src/gtk/gtk-ev.scm @@ -191,7 +191,8 @@ USA. ;; Test debugging in a callback. (bkpt 'Test)) - (if (= type (C-enum "GDK_MOTION_NOTIFY")) + ;; Unnecessary and deprecated. + #;(if (= type (C-enum "GDK_MOTION_NOTIFY")) (C-call "gdk_window_get_pointer" #f (C-> GdkEvent "GdkEventMotion window") 0 0 0)) #f ;; continue handling. -- 2.25.1