X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Fwindows.c;h=52c931273df80e416db3f5632496e85adb334288;hp=44cce89faca0141b68fabdfd3b6bf2a754cf2210;hb=5f1f12f2a37da634000f96d18d59cc73a8814ef7;hpb=3243731044b944673630b55e16674c191b026f84 diff --git a/driver/windows.c b/driver/windows.c index 44cce89f..52c93127 100644 --- a/driver/windows.c +++ b/driver/windows.c @@ -1,5 +1,5 @@ /* windows.c --- turning the screen black; dealing with visuals, virtual roots. - * xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski + * xscreensaver, Copyright (c) 1991-2010 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -286,16 +286,27 @@ grab_keyboard_and_mouse (saver_info *si, Window window, Cursor cursor, /* When should we allow blanking to proceed? The current theory - is that a keyboard grab is manditory; a mouse grab is optional. + is that a keyboard grab is mandatory; a mouse grab is optional. - If we don't have a keyboard grab, then we won't be able to - read a password to unlock, so the kbd grab is manditory. + read a password to unlock, so the kbd grab is mandatory. (We can't conditionalize this on locked_p, because someone might run "xscreensaver-command -lock" at any time.) - If we don't have a mouse grab, then we might not see mouse clicks as a signal to unblank -- but we will still see kbd activity, so that's not a disaster. + + It has been suggested that we should allow blanking if locking + is disabled, and we have a mouse grab but no keyboard grab + (that is: kstatus != GrabSuccess && + mstatus == GrabSuccess && + si->locking_disabled_p) + That would allow screen blanking (but not locking) while the gdm + login screen had the keyboard grabbed, but one would have to use + the mouse to unblank. Keyboard characters would go to the gdm + login field without unblanking. I have not made this change + because I'm not completely convinced it is a safe thing to do. */ if (kstatus != GrabSuccess) /* Do not blank without a kbd grab. */