X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=driver%2Fxscreensaver.c;fp=driver%2Fxscreensaver.c;h=d7478378a3da5e7d561252724fc57c152a8f23cf;hp=d2dbeb9227759a4c14478579357a0b3914f33d39;hb=d1ae2829ff0fd2a96c16a0c8c5420efaa47d7b30;hpb=7edd66e6bd3209013ee059819747b10b5835635b diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c index d2dbeb92..d7478378 100644 --- a/driver/xscreensaver.c +++ b/driver/xscreensaver.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1991-2013 Jamie Zawinski +/* xscreensaver, Copyright (c) 1991-2014 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 @@ -93,6 +93,14 @@ * subwindows. It is an incredible misdesign that one client can make * another client malfunction in this way. * + * But here's a new kink that started showing up in late 2014: GNOME programs + * don't actually select for or receive KeyPress events! They do it behind + * the scenes through some kind of Input Method magic, even when running in + * an en_US locale. However, in that case, those applications *do* seem to + * update the _NET_WM_USER_TIME on their own windows every time they have + * received a secret KeyPress, so we *also* monitor that property on every + * window, and treat changes to it as identical to KeyPress. + * * To detect mouse motion, we periodically wake up and poll the mouse * position and button/modifier state, and notice when something has * changed. We make this check every five seconds by default, and since the @@ -659,6 +667,7 @@ connect_to_server (saver_info *si, int *argc, char **argv) XA_XSETROOT_ID = XInternAtom (si->dpy, "_XSETROOT_ID", False); XA_ESETROOT_PMAP_ID = XInternAtom (si->dpy, "ESETROOT_PMAP_ID", False); XA_XROOTPMAP_ID = XInternAtom (si->dpy, "_XROOTPMAP_ID", False); + XA_NET_WM_USER_TIME = XInternAtom (si->dpy, "_NET_WM_USER_TIME", False); XA_ACTIVATE = XInternAtom (si->dpy, "ACTIVATE", False); XA_DEACTIVATE = XInternAtom (si->dpy, "DEACTIVATE", False); XA_RESTART = XInternAtom (si->dpy, "RESTART", False);