[Xfce4-commits] [apps/xfce4-terminal] 01/01: Refine previous commit

noreply at xfce.org noreply at xfce.org
Sun Feb 25 18:28:38 CET 2018


This is an automated email from the git hooks/post-receive script.

f   2   4   0   4       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 apps/xfce4-terminal.

commit 0b84918c062f48ce0b11682060b1883342c9e391
Author: Igor <f2404 at yandex.ru>
Date:   Sun Feb 25 12:28:31 2018 -0500

    Refine previous commit
---
 terminal/terminal-util.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/terminal/terminal-util.c b/terminal/terminal-util.c
index 9a5d315..8ff6b93 100644
--- a/terminal/terminal-util.c
+++ b/terminal/terminal-util.c
@@ -98,9 +98,10 @@ void
 terminal_util_activate_window (GtkWindow *window)
 {
 #ifdef GDK_WINDOWING_X11
-  guint32             timestamp;
-  XClientMessageEvent event;
-  GdkWindow          *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+  guint32              timestamp;
+  XClientMessageEvent  event;
+  GdkWindow           *gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
+  GdkDisplay          *display = gdk_window_get_display (gdk_window);
 
   terminal_return_if_fail (GTK_IS_WINDOW (window));
   terminal_return_if_fail (gtk_widget_get_realized (GTK_WIDGET (window)));
@@ -127,15 +128,15 @@ terminal_util_activate_window (GtkWindow *window)
   event.data.l[1] = timestamp;
   event.data.l[2] = event.data.l[3] = event.data.l[4] = 0;
 
-  gdk_x11_display_error_trap_push (gdk_window_get_display (gdk_window));
+  gdk_x11_display_error_trap_push (display);
 
   XSendEvent (gdk_x11_get_default_xdisplay (),
               gdk_x11_get_default_root_xwindow (), False,
               StructureNotifyMask, (XEvent *) &event);
 
-  gdk_display_flush (gdk_window_get_display (gdk_window));
+  gdk_display_flush (display);
 
-  if (gdk_x11_display_error_trap_pop (gdk_window_get_display (gdk_window)) != 0)
+  if (gdk_x11_display_error_trap_pop (display) != 0)
     g_critical ("Failed to focus window");
 #else
   /* our best guess on non-x11 clients */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list