[Xfce4-commits] [xfce/xfce4-panel] 01/01: Replace deprecations (X error event ignoring)
noreply at xfce.org
noreply at xfce.org
Thu Nov 8 23:10:49 CET 2018
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-panel.
commit 3a736e64e3b9412eb1fd3b38e311b7a724392e4f
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Nov 8 23:10:02 2018 +0100
Replace deprecations (X error event ignoring)
---
panel/panel-plugin-external-46.c | 7 ++++---
panel/panel-window.c | 10 +++++-----
plugins/systray/systray-socket.c | 12 ++++++------
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/panel/panel-plugin-external-46.c b/panel/panel-plugin-external-46.c
index faf7a07..3f1e275 100644
--- a/panel/panel-plugin-external-46.c
+++ b/panel/panel-plugin-external-46.c
@@ -273,7 +273,8 @@ panel_plugin_external_46_set_properties (PanelPluginExternal *external,
event.xclient.message_type = panel_atom;
event.xclient.format = 16;
- gdk_error_trap_push ();
+ window = gtk_socket_get_plug_window (GTK_SOCKET (external));
+ gdk_x11_display_error_trap_push (gdk_window_get_display (window));
for (li = properties; li != NULL; li = li->next)
{
@@ -342,9 +343,9 @@ panel_plugin_external_46_set_properties (PanelPluginExternal *external,
bailout:
- gdk_flush ();
+ gdk_display_flush (gdk_window_get_display (window));
- if (gdk_error_trap_pop () != 0)
+ if (gdk_x11_display_error_trap_pop (gdk_window_get_display (window)) != 0)
{
g_critical ("Failed to send client messages for %s-%d",
panel_module_get_name (external->module),
diff --git a/panel/panel-window.c b/panel/panel-window.c
index 41354a9..e9af4bf 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -1714,7 +1714,7 @@ panel_window_screen_struts_set (PanelWindow *window)
return;
/* don't crash on x errors */
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (window->display);
/* set the wm strut partial */
panel_return_if_fail (GDK_IS_WINDOW (gtk_widget_get_window (GTK_WIDGET (window))));
@@ -1732,7 +1732,7 @@ panel_window_screen_struts_set (PanelWindow *window)
#endif
/* release the trap */
- if (gdk_error_trap_pop () != 0)
+ if (gdk_x11_display_error_trap_pop (window->display) != 0)
g_critical ("Failed to set the struts");
if (panel_debug_has_domain (PANEL_DEBUG_YES))
@@ -3094,14 +3094,14 @@ panel_window_focus (PanelWindow *window)
event.format = 32;
event.data.l[0] = 0;
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (window->display);
XSendEvent (gdk_x11_get_default_xdisplay (), GDK_ROOT_WINDOW (), False,
StructureNotifyMask, (XEvent *) &event);
- gdk_flush ();
+ gdk_display_flush (window->display);
- if (gdk_error_trap_pop () != 0)
+ if (gdk_x11_display_error_trap_pop (window->display) != 0)
g_critical ("Failed to focus panel window");
#else
/* our best guess on non-x11 clients */
diff --git a/plugins/systray/systray-socket.c b/plugins/systray/systray-socket.c
index 6188774..108c1a8 100644
--- a/plugins/systray/systray-socket.c
+++ b/plugins/systray/systray-socket.c
@@ -251,12 +251,12 @@ systray_socket_new (GdkScreen *screen,
/* get the window attributes */
display = gdk_screen_get_display (screen);
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (display);
result = XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (display),
window, &attr);
/* leave on an error or if the window does not exist */
- if (gdk_error_trap_pop () != 0 || result == 0)
+ if (gdk_x11_display_error_trap_pop (display) != 0 || result == 0)
return NULL;
/* get the windows visual */
@@ -308,7 +308,7 @@ systray_socket_force_redraw (SystraySocket *socket)
xev.xexpose.height = allocation.height;
xev.xexpose.count = 0;
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (display);
XSendEvent (GDK_DISPLAY_XDISPLAY (display),
xev.xexpose.window,
False, ExposureMask,
@@ -317,7 +317,7 @@ systray_socket_force_redraw (SystraySocket *socket)
* since that is asynchronous.
*/
XSync (GDK_DISPLAY_XDISPLAY (display), False);
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (display);
}
}
@@ -354,7 +354,7 @@ systray_socket_get_name_prop (SystraySocket *socket,
req_type = gdk_x11_get_xatom_by_name_for_display (display, type_name);
- gdk_error_trap_push ();
+ gdk_x11_display_error_trap_push (display);
result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
socket->window,
@@ -366,7 +366,7 @@ systray_socket_get_name_prop (SystraySocket *socket,
(guchar **) &val);
/* check if everything went fine */
- if (gdk_error_trap_pop () != 0
+ if (gdk_x11_display_error_trap_pop (display) != 0
|| result != Success
|| val == NULL)
return NULL;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list