changeset 34292:e60d8bdb4795

X11: update title only on reconfigure instead of at least once per frame. At least currently such frequent updates are not necessary and they are a bit of a performance issue, at least when used with X forwarding.
author reimar
date Sat, 03 Dec 2011 19:06:19 +0000
parents e61a652e9cf1
children 3f409c370881
files libvo/x11_common.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Sat Dec 03 18:43:54 2011 +0000
+++ b/libvo/x11_common.c	Sat Dec 03 19:06:19 2011 +0000
@@ -1079,6 +1079,8 @@
                              Colormap col_map,
                              const char *classname, const char *title)
 {
+  if (vo_wintitle)
+    title = vo_wintitle;
   if (WinID >= 0) {
     vo_fs = flags & VOFLAG_FULLSCREEN;
     vo_window = WinID ? (Window)WinID : mRootWin;
@@ -1117,12 +1119,12 @@
   }
   if (flags & VOFLAG_HIDDEN)
     goto final;
+  XStoreName(mDisplay, vo_window, title);
   if (window_state & VOFLAG_HIDDEN) {
     XSizeHints hint;
     XEvent xev;
     window_state &= ~VOFLAG_HIDDEN;
     vo_x11_classhint(mDisplay, vo_window, classname);
-    XStoreName(mDisplay, vo_window, title);
     vo_hidecursor(mDisplay, vo_window);
     XSelectInput(mDisplay, vo_window, StructureNotifyMask);
     hint.x = x; hint.y = y;
@@ -1351,8 +1353,6 @@
     if (w <= INT_MAX && h <= INT_MAX) { vo_dwidth = w; vo_dheight = h; }
     XTranslateCoordinates(mDisplay, vo_window, mRootWin, 0, 0, &vo_dx, &vo_dy,
                           &dummy_win);
-    if (vo_wintitle)
-        XStoreName(mDisplay, vo_window, vo_wintitle);
 
     return depth <= INT_MAX ? depth : 0;
 }