[gtk+] gtk-demo: Fix warnings in changedisplay
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk-demo: Fix warnings in changedisplay
- Date: Fri, 16 Dec 2011 04:00:14 +0000 (UTC)
commit f8426cd706c99a93eb6a4585319dfec1dc1af902
Author: Benjamin Otte <otte redhat com>
Date: Fri Dec 16 04:49:03 2011 +0100
gtk-demo: Fix warnings in changedisplay
Use the brute force fix. I'm not really interested in fixing this
properly.
demos/gtk-demo/changedisplay.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/demos/gtk-demo/changedisplay.c b/demos/gtk-demo/changedisplay.c
index 99b4e0c..f38819d 100644
--- a/demos/gtk-demo/changedisplay.c
+++ b/demos/gtk-demo/changedisplay.c
@@ -78,7 +78,8 @@ find_toplevel_at_pointer (GdkDisplay *display)
GdkWindow *pointer_window;
GtkWidget *widget = NULL;
- pointer_window = gdk_display_get_window_at_pointer (display, NULL, NULL);
+ pointer_window = gdk_device_get_window_at_position (gtk_get_current_event_device (),
+ NULL, NULL);
/* The user data field of a GdkWindow is used to store a pointer
* to the widget that created it.
@@ -131,11 +132,13 @@ query_for_toplevel (GdkScreen *screen,
gtk_widget_show_all (popup);
cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
- if (gdk_pointer_grab (gtk_widget_get_window (popup), FALSE,
- GDK_BUTTON_RELEASE_MASK,
- NULL,
- cursor,
- GDK_CURRENT_TIME) == GDK_GRAB_SUCCESS)
+ if (gdk_device_grab (gtk_get_current_event_device (),
+ gtk_widget_get_window (popup),
+ GDK_OWNERSHIP_NONE,
+ FALSE,
+ GDK_BUTTON_RELEASE_MASK,
+ cursor,
+ GDK_CURRENT_TIME) == GDK_GRAB_SUCCESS)
{
gboolean clicked = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]