* Boston, MA 02111-1307, USA.
*/
+/*
+ * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
+ * file for a list of people on the GTK+ Team. See the ChangeLog
+ * files for a list of changes. These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
#ifdef XINPUT_GXI
/* #define DEBUG_SWITCHING */
GdkWindow * confine_to,
guint32 time)
{
- GdkInputWindow *input_window, *new_window;
GList *tmp_list;
+ GdkInputWindow *input_window;
GdkDevicePrivate *gdkdev;
- GList *tmp_list;
tmp_list = gdk_input_windows;
while (tmp_list)
input_window = (GdkInputWindow *)tmp_list->data;
if (input_window->window == window)
- new_window = input_window;
- else (input_window->grabbed)
+ input_window->grabbed = TRUE;
+ else if (input_window->grabbed)
input_window->grabbed = FALSE;
- tmp_list = gdk_input_devices;
- while (tmp_list)
- {
- gdkdev = (GdkDevicePrivate *)tmp_list->data;
- if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
- gdkdev->xdevice &&
- (gdkdev->button_state != 0))
- gdkdev->button_state = 0;
-
- tmp_list = tmp_list->next;
- }
-
+ tmp_list = tmp_list->next;
+ }
+
+ tmp_list = gdk_input_devices;
+ while (tmp_list)
+ {
+ gdkdev = (GdkDevicePrivate *)tmp_list->data;
+ if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
+ gdkdev->xdevice &&
+ (gdkdev->button_state != 0))
+ gdkdev->button_state = 0;
tmp_list = tmp_list->next;
}
- new_window->grabbed = TRUE;
return Success;
}