Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 339198
Collapse All | Expand All

(-)gpointing-device-settings-1.5.1-orig/modules/gnome-settings-daemon-plugins/gsd-touchpad-manager.c (-3 / +3 lines)
Lines 348-354 Link Here
348
348
349
    gint op_code, event, error;
349
    gint op_code, event, error;
350
350
351
    if (!XQueryExtension(GDK_DISPLAY(),
351
    display = gdk_x11_get_default_xdisplay();
352
353
    if (!XQueryExtension(display,
352
                         "XInputExtension",
354
                         "XInputExtension",
353
                         &op_code,
355
                         &op_code,
354
                         &event,
356
                         &event,
Lines 356-363 Link Here
356
        return;
358
        return;
357
    }
359
    }
358
360
359
    display = gdk_x11_get_default_xdisplay();
360
361
    gdk_error_trap_push();
361
    gdk_error_trap_push();
362
    DevicePresence(display, xi_presence, class_presence);
362
    DevicePresence(display, xi_presence, class_presence);
363
    XSelectExtensionEvent(display,
363
    XSelectExtensionEvent(display,
(-)gpointing-device-settings-1.5.1-orig/src/gpds-xinput.c (-11 / +16 lines)
Lines 99-105 Link Here
99
    g_free(priv->device_name);
99
    g_free(priv->device_name);
100
100
101
    if (priv->device) {
101
    if (priv->device) {
102
        XCloseDevice(GDK_DISPLAY(), priv->device);
102
        XCloseDevice(gdk_x11_get_default_xdisplay(), priv->device);
103
        priv->device = NULL;
103
        priv->device = NULL;
104
    }
104
    }
105
105
Lines 193-199 Link Here
193
{
193
{
194
    gchar buf[64];
194
    gchar buf[64];
195
195
196
    XGetErrorText(GDK_DISPLAY(), x_error_code, buf, sizeof(buf) - 1);
196
    XGetErrorText(gdk_x11_get_default_xdisplay(), x_error_code,
197
                  buf, sizeof(buf) - 1);
197
198
198
    return g_strdup(buf);
199
    return g_strdup(buf);
199
}
200
}
Lines 267-273 Link Here
267
    }
268
    }
268
269
269
    gdk_error_trap_push();
270
    gdk_error_trap_push();
270
    XChangeDeviceProperty(GDK_DISPLAY(),
271
    XChangeDeviceProperty(gdk_x11_get_default_xdisplay(),
271
                          device, property_atom,
272
                          device, property_atom,
272
                          XA_INTEGER, format_type, PropModeReplace,
273
                          XA_INTEGER, format_type, PropModeReplace,
273
                          (unsigned char*)property_data, n_properties);
274
                          (unsigned char*)property_data, n_properties);
Lines 377-383 Link Here
377
    if (!device)
378
    if (!device)
378
        return -1;
379
        return -1;
379
380
380
    properties = XListDeviceProperties(GDK_DISPLAY(), device, &n_properties);
381
    properties = XListDeviceProperties(gdk_x11_get_default_xdisplay(),
382
                                       device, &n_properties);
381
    for (i = 0; i < n_properties; i++) {
383
    for (i = 0; i < n_properties; i++) {
382
        const gchar *name;
384
        const gchar *name;
383
385
Lines 421-429 Link Here
421
        return FALSE;
423
        return FALSE;
422
424
423
    gdk_error_trap_push();
425
    gdk_error_trap_push();
424
    status =  XGetDeviceProperty(GDK_DISPLAY(), device, atom, 0, 1000, False,
426
    status =  XGetDeviceProperty(gdk_x11_get_default_xdisplay(), device, atom,
425
                                 XA_INTEGER, &actual_type, &actual_format,
427
                                 0, 1000, False, XA_INTEGER, &actual_type,
426
                                 n_values, &bytes_after, &data);
428
                                 &actual_format, n_values, &bytes_after, &data);
427
    gdk_flush();
429
    gdk_flush();
428
    x_error_code = gdk_error_trap_pop();
430
    x_error_code = gdk_error_trap_pop();
429
    if (status != Success || x_error_code != 0) {
431
    if (status != Success || x_error_code != 0) {
Lines 517-523 Link Here
517
        *(property_data + i) = (gfloat)properties[i];
519
        *(property_data + i) = (gfloat)properties[i];
518
520
519
    gdk_error_trap_push();
521
    gdk_error_trap_push();
520
    XChangeDeviceProperty(GDK_DISPLAY(),
522
    XChangeDeviceProperty(gdk_x11_get_default_xdisplay(),
521
                          device, property_atom,
523
                          device, property_atom,
522
                          float_atom, 32, PropModeReplace,
524
                          float_atom, 32, PropModeReplace,
523
                          (unsigned char*)property_data, n_properties);
525
                          (unsigned char*)property_data, n_properties);
Lines 588-594 Link Here
588
        return FALSE;
590
        return FALSE;
589
591
590
    gdk_error_trap_push();
592
    gdk_error_trap_push();
591
    status =  XGetDeviceProperty(GDK_DISPLAY(), device, property_atom, 0, 1000, False,
593
    status =  XGetDeviceProperty(gdk_x11_get_default_xdisplay(), device,
594
                                 property_atom, 0, 1000, False,
592
                                 float_atom, &actual_type, &actual_format,
595
                                 float_atom, &actual_type, &actual_format,
593
                                 n_properties, &bytes_after, &data);
596
                                 n_properties, &bytes_after, &data);
594
    gdk_flush();
597
    gdk_flush();
Lines 670-676 Link Here
670
    *map = g_new0(guchar, *n_buttons);
673
    *map = g_new0(guchar, *n_buttons);
671
674
672
    gdk_error_trap_push();
675
    gdk_error_trap_push();
673
    status =  XGetDeviceButtonMapping(GDK_DISPLAY(), device, *map, *n_buttons);
676
    status =  XGetDeviceButtonMapping(gdk_x11_get_default_xdisplay(),
677
                                      device, *map, *n_buttons);
674
    gdk_flush();
678
    gdk_flush();
675
679
676
    x_error_code = gdk_error_trap_pop();
680
    x_error_code = gdk_error_trap_pop();
Lines 699-705 Link Here
699
        return FALSE;
703
        return FALSE;
700
704
701
    gdk_error_trap_push();
705
    gdk_error_trap_push();
702
    status =  XSetDeviceButtonMapping(GDK_DISPLAY(), device, map, n_buttons);
706
    status =  XSetDeviceButtonMapping(gdk_x11_get_default_xdisplay(),
707
                                      device, map, n_buttons);
703
    gdk_flush();
708
    gdk_flush();
704
709
705
    x_error_code = gdk_error_trap_pop();
710
    x_error_code = gdk_error_trap_pop();
(-)gpointing-device-settings-1.5.1-orig/src/gpds-xinput-pointer-info.c (-1 / +2 lines)
Lines 55-61 Link Here
55
    XDeviceInfo *device_infos;
55
    XDeviceInfo *device_infos;
56
    gint i, n_device_infos;
56
    gint i, n_device_infos;
57
57
58
    device_infos = XListInputDevices(GDK_DISPLAY(), &n_device_infos);
58
    device_infos = XListInputDevices(gdk_x11_get_default_xdisplay(),
59
                                     &n_device_infos);
59
60
60
    for (i = 0; i < n_device_infos; i++) {
61
    for (i = 0; i < n_device_infos; i++) {
61
        GpdsXInputPointerInfo *info;
62
        GpdsXInputPointerInfo *info;
(-)gpointing-device-settings-1.5.1-orig/src/gpds-xinput-utils.c (-2 / +3 lines)
Lines 41-47 Link Here
41
    XDeviceInfo *device_infos;
41
    XDeviceInfo *device_infos;
42
    gint i, n_device_infos;
42
    gint i, n_device_infos;
43
43
44
    device_infos = XListInputDevices(GDK_DISPLAY(), &n_device_infos);
44
    device_infos = XListInputDevices(gdk_x11_get_default_xdisplay(),
45
                                     &n_device_infos);
45
46
46
    for (i = 0; i < n_device_infos; i++) {
47
    for (i = 0; i < n_device_infos; i++) {
47
        if (device_infos[i].use != IsXExtensionPointer)
48
        if (device_infos[i].use != IsXExtensionPointer)
Lines 98-104 Link Here
98
        return NULL;
99
        return NULL;
99
100
100
    gdk_error_trap_push();
101
    gdk_error_trap_push();
101
    device = XOpenDevice(GDK_DISPLAY(), device_info->id);
102
    device = XOpenDevice(gdk_x11_get_default_xdisplay(), device_info->id);
102
    gdk_error_trap_pop();
103
    gdk_error_trap_pop();
103
    if (!device) {
104
    if (!device) {
104
        g_set_error(error,
105
        g_set_error(error,
(-)gpointing-device-settings-1.5.1-orig/test/test-xinput-utils.c (-1 / +1 lines)
Lines 28-34 Link Here
28
teardown (void)
28
teardown (void)
29
{
29
{
30
    if (device)
30
    if (device)
31
        XCloseDevice(GDK_DISPLAY(), device);
31
        XCloseDevice(gdk_x11_get_default_xdisplay(), device);
32
    g_clear_error(&error);
32
    g_clear_error(&error);
33
    g_clear_error(&expected_error);
33
    g_clear_error(&expected_error);
34
}
34
}

Return to bug 339198