diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-02-01 15:23:12 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-02-01 15:23:12 -0800 |
commit | 450e9eb2725be6ead1c6d3e5477b737ded04070b (patch) | |
tree | 1d781a93866afaa5aa06ce2f6f888f8eb9a7d306 | |
parent | e4274acc8cb7354cf191f91a8ed2054cb7af9916 (diff) |
Bug #8561: xdm painfully slow at cursor redraws
<https://bugs.freedesktop.org/show_bug.cgi?id=8561>
Made code that waited for cursor redraws to appear onscreen conditional on
FORCE_CURSOR_FLASH #define, which is off by default.
-rw-r--r-- | greeter/Login.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/greeter/Login.c b/greeter/Login.c index 21fe5f9..cb114ed 100644 --- a/greeter/Login.c +++ b/greeter/Login.c @@ -448,10 +448,12 @@ realizeCursor (LoginWidget w, GC gc) int x, y; int height, width; +#ifdef FORCE_CURSOR_FLASH static int lastx, lasty; static struct timeval lastFlash; struct timeval now, timeout; int sinceLastFlash; +#endif if (w->login.state != PROMPTING) { return; @@ -504,7 +506,7 @@ realizeCursor (LoginWidget w, GC gc) x+2 , y - F_ASCENT(text)+height); #endif /* XPM */ - +#ifdef FORCE_CURSOR_FLASH /* Force cursor to flash briefly to give user feedback */ #define FLASH_MILLIS 100000 /* 0.10 seconds */ #define MILLIS_PER_SEC 1000000 @@ -529,8 +531,9 @@ realizeCursor (LoginWidget w, GC gc) } else { lastx = x; lasty = y; } - XFlush (XtDisplay(w)); X_GETTIMEOFDAY (&lastFlash); +#endif /* FORCE_CURSOR_FLASH */ + XFlush (XtDisplay(w)); } static void |