@@ -1444,6 +1444,7 @@ mate_bg_get_surface_from_root (GdkScreen *screen)
1444
1444
int screen_num ;
1445
1445
cairo_surface_t * surface ;
1446
1446
cairo_surface_t * source_pixmap ;
1447
+ GdkDisplay * gdkdisplay ;
1447
1448
int width , height ;
1448
1449
cairo_t * cr ;
1449
1450
@@ -1466,7 +1467,8 @@ mate_bg_get_surface_from_root (GdkScreen *screen)
1466
1467
}
1467
1468
1468
1469
if (data != NULL ) {
1469
- gdk_error_trap_push ();
1470
+ gdkdisplay = gdk_screen_get_display (screen );
1471
+ gdk_x11_display_error_trap_push (gdkdisplay );
1470
1472
1471
1473
Pixmap xpixmap = * (Pixmap * ) data ;
1472
1474
Window root_return ;
@@ -1484,7 +1486,7 @@ mate_bg_get_surface_from_root (GdkScreen *screen)
1484
1486
w_ret , h_ret );
1485
1487
}
1486
1488
1487
- gdk_error_trap_pop_ignored ( );
1489
+ gdk_x11_display_error_trap_pop_ignored ( gdkdisplay );
1488
1490
}
1489
1491
1490
1492
width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen ));
@@ -1537,6 +1539,7 @@ mate_bg_set_root_pixmap_id (GdkScreen *screen,
1537
1539
int format , result ;
1538
1540
unsigned long nitems , after ;
1539
1541
unsigned char * data_root , * data_esetroot ;
1542
+ GdkDisplay * gdkdisplay ;
1540
1543
1541
1544
/* Get atoms for both properties in an array, only if they exist.
1542
1545
* This method is to avoid multiple round-trips to Xserver
@@ -1561,14 +1564,15 @@ mate_bg_set_root_pixmap_id (GdkScreen *screen,
1561
1564
Pixmap xrootpmap = * ((Pixmap * ) data_root );
1562
1565
Pixmap esetrootpmap = * ((Pixmap * ) data_esetroot );
1563
1566
1564
- gdk_error_trap_push ();
1567
+ gdkdisplay = gdk_screen_get_display (screen );
1568
+ gdk_x11_display_error_trap_push (gdkdisplay );
1565
1569
if (xrootpmap && xrootpmap == esetrootpmap ) {
1566
1570
XKillClient (display , xrootpmap );
1567
1571
}
1568
1572
if (esetrootpmap && esetrootpmap != xrootpmap ) {
1569
1573
XKillClient (display , esetrootpmap );
1570
1574
}
1571
- gdk_error_trap_pop_ignored ( );
1575
+ gdk_x11_display_error_trap_pop_ignored ( gdkdisplay );
1572
1576
}
1573
1577
if (data_esetroot != NULL ) {
1574
1578
XFree (data_esetroot );
0 commit comments