mutter-mag: Remove deprecated stuff
https://bugzilla.gnome.org/show_bug.cgi?id=662895
This commit is contained in:
parent
8087872130
commit
1b04a40dce
@ -148,8 +148,15 @@ grab_area_at_mouse (GtkWidget *invisible,
|
|||||||
static void
|
static void
|
||||||
shutdown_grab (void)
|
shutdown_grab (void)
|
||||||
{
|
{
|
||||||
gdk_keyboard_ungrab (gtk_get_current_event_time ());
|
GdkDeviceManager *manager;
|
||||||
gdk_pointer_ungrab (gtk_get_current_event_time ());
|
GdkDevice *device;
|
||||||
|
|
||||||
|
manager = gdk_display_get_device_manager (gdk_display_get_default ());
|
||||||
|
device = gdk_device_manager_get_client_pointer (manager);
|
||||||
|
|
||||||
|
gdk_device_ungrab (device, gtk_get_current_event_time ());
|
||||||
|
gdk_device_ungrab (gdk_device_get_associated_device (device),
|
||||||
|
gtk_get_current_event_time ());
|
||||||
gtk_grab_remove (grab_widget);
|
gtk_grab_remove (grab_widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,6 +234,8 @@ static void
|
|||||||
begin_area_grab (void)
|
begin_area_grab (void)
|
||||||
{
|
{
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
|
GdkDeviceManager *manager;
|
||||||
|
GdkDevice *device;
|
||||||
|
|
||||||
if (grab_widget == NULL)
|
if (grab_widget == NULL)
|
||||||
{
|
{
|
||||||
@ -239,24 +248,31 @@ begin_area_grab (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
window = gtk_widget_get_window (grab_widget);
|
window = gtk_widget_get_window (grab_widget);
|
||||||
|
manager = gdk_display_get_device_manager (gdk_display_get_default ());
|
||||||
|
device = gdk_device_manager_get_client_pointer (manager);
|
||||||
|
|
||||||
if (gdk_keyboard_grab (window,
|
if (gdk_device_grab (device,
|
||||||
FALSE,
|
window,
|
||||||
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
GDK_OWNERSHIP_NONE,
|
||||||
|
FALSE,
|
||||||
|
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
|
||||||
|
NULL,
|
||||||
|
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
||||||
{
|
{
|
||||||
g_warning ("Failed to grab keyboard to do eyedropper");
|
g_warning ("Failed to grab pointer to do eyedropper");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gdk_pointer_grab (window,
|
if (gdk_device_grab (gdk_device_get_associated_device (device),
|
||||||
FALSE,
|
window,
|
||||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
|
GDK_OWNERSHIP_NONE,
|
||||||
NULL,
|
FALSE,
|
||||||
NULL,
|
GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
|
||||||
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
NULL,
|
||||||
|
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
|
||||||
{
|
{
|
||||||
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
|
gdk_device_ungrab (device, gtk_get_current_event_time ());
|
||||||
g_warning ("Failed to grab pointer to do eyedropper");
|
g_warning ("Failed to grab keyboard to do eyedropper");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user