Package: rxvt
Version: 1:2.6.4-10
Severity: normal
Tags: patch

reproducing,
Give fvwm the focus.  Completely obscure the window.  Give another
window the focus.  The problem is, rxvt sets a variable to refresh the
screen when it looses focus and when it gets focus (among other
things).  It also has logic to not draw if the window is completely
obscured (no point if nothing is going to be displayed.)  The problem
is if it is obscured (don't update) and looses focus (set flag to
refresh), it never can draw and it is in a loop trying.

My solution is to short circuit the refresh routine.  If it is
obscured or not mapped then unset the refresh variable.

This is easy to reproduce using the fvwm window manager as it lets you
move windows without bringing the window to the foreground.  Move the
rxvt window behind another window that is bigger and let go.  The
window focus will transfer to the foreground window and the rxvt
program will be in a loop between select and ioctl until it gets the
focus back or is visible.

rxvt-unicode changed it to set want_refresh=0 at the beginning of the
routine instead of the end so it will not happen there.  Either
solution would be fine.

--- rxvt-2.6.4.orig/src/screen.c        2006-02-19 09:24:03.000000000 -0600
+++ ../rxvt-2.6.4/src/screen.c  2006-02-17 20:46:04.000000000 -0600
@@ -2204,10 +2204,16 @@ scr_refresh(int type)
 #endif
     int             (*draw_string) (), (*draw_image_string) ();
 
-    if (type == NO_REFRESH)
-       return;
-    if (!TermWin.mapped)
+    if (type == NO_REFRESH || !TermWin.mapped)
+    {
+       /* If the window is completely obscured (NO_REFRESH) we really
+        * don't want to refresh, that is why we are returning instead, but
+        * first we must say mark the flag don't refresh.  A similar
+        * argument works for !mapped.
+        */
+       want_refresh=0;
        return;
+    }
 
 /*
  * A: set up vars




-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14-rc3
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages rxvt depends on:
ii  base-passwd              3.5.10          Debian base system master password
ii  libc6                    2.3.5-7         GNU C Library: Shared libraries an
ii  libx11-6                 6.8.2.dfsg.1-10 X Window System protocol client li
ii  xlibs                    6.8.2.dfsg.1-10 X Window System client libraries m

rxvt recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to