Commit 16f8b9f6 authored by PST 1998 Shawn T. Amundson's avatar PST 1998 Shawn T. Amundson Committed by Shawn Amundson

return NULL if device is not ready gtk/gtkwindow.h: check for

Fri Mar  6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>

        * Applied gtk-matsu-980205-0 (oops, should be 980305)
          gdk/gdkinputcommon.h: return NULL if device is not ready
          gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
parent 2095c552
Fri Mar 6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Applied gtk-matsu-980205-0 (oops, should be 980305)
gdk/gdkinputcommon.h: return NULL if device is not ready
gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
Fri Mar 6 13:17:58 1998 Marc Ewing <marc@.redhat.com>
* gtk/gtkclist.c (real_select_row, real_unselect_row):
......
Fri Mar 6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Applied gtk-matsu-980205-0 (oops, should be 980305)
gdk/gdkinputcommon.h: return NULL if device is not ready
gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
Fri Mar 6 13:17:58 1998 Marc Ewing <marc@.redhat.com>
* gtk/gtkclist.c (real_select_row, real_unselect_row):
......
Fri Mar 6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Applied gtk-matsu-980205-0 (oops, should be 980305)
gdk/gdkinputcommon.h: return NULL if device is not ready
gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
Fri Mar 6 13:17:58 1998 Marc Ewing <marc@.redhat.com>
* gtk/gtkclist.c (real_select_row, real_unselect_row):
......
Fri Mar 6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Applied gtk-matsu-980205-0 (oops, should be 980305)
gdk/gdkinputcommon.h: return NULL if device is not ready
gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
Fri Mar 6 13:17:58 1998 Marc Ewing <marc@.redhat.com>
* gtk/gtkclist.c (real_select_row, real_unselect_row):
......
Fri Mar 6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Applied gtk-matsu-980205-0 (oops, should be 980305)
gdk/gdkinputcommon.h: return NULL if device is not ready
gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
Fri Mar 6 13:17:58 1998 Marc Ewing <marc@.redhat.com>
* gtk/gtkclist.c (real_select_row, real_unselect_row):
......
Fri Mar 6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Applied gtk-matsu-980205-0 (oops, should be 980305)
gdk/gdkinputcommon.h: return NULL if device is not ready
gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
Fri Mar 6 13:17:58 1998 Marc Ewing <marc@.redhat.com>
* gtk/gtkclist.c (real_select_row, real_unselect_row):
......
Fri Mar 6 14:47:33 PST 1998 Shawn T. Amundson <amundson@gimp.org>
* Applied gtk-matsu-980205-0 (oops, should be 980305)
gdk/gdkinputcommon.h: return NULL if device is not ready
gtk/gtkwindow.h: check for GDK_ISO_Left_Tab
Fri Mar 6 13:17:58 1998 Marc Ewing <marc@.redhat.com>
* gtk/gtkclist.c (real_select_row, real_unselect_row):
......
......@@ -257,7 +257,29 @@ gdk_input_device_new(XDeviceInfo *device, gint include_core)
}
if (device->use != IsXPointer)
{
int error_warn = gdk_error_warnings;
gdk_error_warnings = 0;
gdk_error_code = 0;
gdkdev->xdevice = XOpenDevice(gdk_display, gdkdev->info.deviceid);
gdk_error_warnings = error_warn;
/* return NULL if device is not ready */
if (gdk_error_code)
{
g_free (gdkdev->info.name);
if (gdkdev->axes)
g_free (gdkdev->axes);
if (gdkdev->info.keys)
g_free (gdkdev->info.keys);
if (gdkdev->info.axes)
g_free (gdkdev->info.axes);
g_free (gdkdev);
return NULL;
}
}
gdkdev->buttonpress_type = 0;
gdkdev->buttonrelease_type = 0;
......
......@@ -257,7 +257,29 @@ gdk_input_device_new(XDeviceInfo *device, gint include_core)
}
if (device->use != IsXPointer)
{
int error_warn = gdk_error_warnings;
gdk_error_warnings = 0;
gdk_error_code = 0;
gdkdev->xdevice = XOpenDevice(gdk_display, gdkdev->info.deviceid);
gdk_error_warnings = error_warn;
/* return NULL if device is not ready */
if (gdk_error_code)
{
g_free (gdkdev->info.name);
if (gdkdev->axes)
g_free (gdkdev->axes);
if (gdkdev->info.keys)
g_free (gdkdev->info.keys);
if (gdkdev->info.axes)
g_free (gdkdev->info.axes);
g_free (gdkdev);
return NULL;
}
}
gdkdev->buttonpress_type = 0;
gdkdev->buttonrelease_type = 0;
......
......@@ -806,6 +806,7 @@ gtk_window_key_press_event (GtkWidget *widget,
case GDK_Left:
case GDK_Right:
case GDK_Tab:
case GDK_ISO_Left_Tab:
switch (event->keyval)
{
case GDK_Up:
......@@ -821,6 +822,7 @@ gtk_window_key_press_event (GtkWidget *widget,
direction = GTK_DIR_RIGHT;
break;
case GDK_Tab:
case GDK_ISO_Left_Tab:
if (event->state & GDK_SHIFT_MASK)
direction = GTK_DIR_TAB_BACKWARD;
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment