Commits

Jeff Sparkes  committed 65594f0

Make util function gtk_widget_get_device global.

* frame-gtk.c (gtk_widget_get_device): Move function to here, make
it global.
* device-gtk.c: Remove gtk_widget_get_device().
* console-gtk.h: Declare here.

  • Participants
  • Parent commits fa61e8a

Comments (0)

Files changed (4)

File src/ChangeLog.GTK

 2013-11-24  Jeff Sparkes  <jsparkes@gmail.com>
 
+	* frame-gtk.c (gtk_widget_get_device): Move function to here, make
+	it global.
+	* device-gtk.c: Remove gtk_widget_get_device()..
+	* console-gtk.h: Declare here.
+
 	* ui-byhand.c (Fgtk_label_get): Don't discard const here; some
 	version of gcc thinks it's an error.
 

File src/console-gtk.h

 struct frame *decode_gtk_frame (Lisp_Object);
 struct device *gtk_any_window_to_device (GdkWindow *);
 struct device *decode_gtk_device (Lisp_Object);
+#ifdef HAVE_GTK3
+GdkDevice *gtk_widget_get_device (GtkWidget *widget);
+#endif
+
 void gtk_handle_property_notify (GdkEventProperty *event);
 
 void signal_special_gtk_user_event (Lisp_Object channel, Lisp_Object function,

File src/device-gtk.c

 /*                          grabs and ungrabs                           */
 /************************************************************************/
 
-#ifdef HAVE_GTK3
-static GdkDevice *
-gtk_widget_get_device (GtkWidget *widget)
-{
-  GdkDisplay *display = gtk_widget_get_display (widget);
-  GdkDeviceManager* manager = gdk_display_get_device_manager(display);
-  GdkDevice* device = gdk_device_manager_get_client_pointer(manager);
-
-  assert (device);
-  return device;
-}
-#endif
-
 DEFUN ("gtk-grab-pointer", Fgtk_grab_pointer, 0, 3, 0, /*
 Grab the pointer and restrict it to its current window.
 If optional DEVICE argument is nil, the default device will be used.

File src/frame-gtk.c

   return (NULL);
 }
 
+#ifdef HAVE_GTK3
+GdkDevice *
+gtk_widget_get_device (GtkWidget *widget)
+{
+  GdkDisplay *display = gtk_widget_get_display (widget);
+  GdkDeviceManager* manager = gdk_display_get_device_manager(display);
+  GdkDevice* device = gdk_device_manager_get_client_pointer(manager);
+
+  assert (device);
+  return device;
+}
+#endif
+
 struct frame *
 decode_gtk_frame (Lisp_Object frame)
 {