projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.14.tar.gz
[xscreensaver]
/
utils
/
grabscreen.c
diff --git
a/utils/grabscreen.c
b/utils/grabscreen.c
index 9bcb4264ac90d86d283b0865347be6d1570cdec0..f9ce753c7a2337746e64de145aca8b81033d8718 100644
(file)
--- a/
utils/grabscreen.c
+++ b/
utils/grabscreen.c
@@
-133,7
+133,6
@@
xscreensaver_window_p (Display *dpy, Window window)
/* Whether the given window is:
- the real root window;
/* Whether the given window is:
- the real root window;
- - the virtual root window;
- a direct child of the root window;
- a direct child of the window manager's decorations.
*/
- a direct child of the root window;
- a direct child of the window manager's decorations.
*/
@@
-142,20
+141,16
@@
top_level_window_p (Screen *screen, Window window)
{
Display *dpy = DisplayOfScreen (screen);
Window root, parent, *kids;
{
Display *dpy = DisplayOfScreen (screen);
Window root, parent, *kids;
- Window vroot = VirtualRootWindowOfScreen(screen);
unsigned int nkids;
unsigned int nkids;
- if (window == vroot)
- return True;
-
if (!XQueryTree (dpy, window, &root, &parent, &kids, &nkids))
return False;
if (window == root)
return True;
if (!XQueryTree (dpy, window, &root, &parent, &kids, &nkids))
return False;
if (window == root)
return True;
- /* If our direct parent is the r
oot (or *a* root)
, then yes. */
- if (parent == root
|| parent == vroot
)
+ /* If our direct parent is the r
eal root window
, then yes. */
+ if (parent == root)
return True;
else
{
return True;
else
{
@@
-183,7
+178,6
@@
top_level_window_p (Screen *screen, Window window)
}
}
-
static Bool error_handler_hit_p = False;
static XErrorHandler old_ehandler = 0;
static int
static Bool error_handler_hit_p = False;
static XErrorHandler old_ehandler = 0;
static int
@@
-229,9
+223,9
@@
use_subwindow_mode_p(Screen *screen, Window window)
static void
install_screen_colormaps (Screen *screen)
{
static void
install_screen_colormaps (Screen *screen)
{
- int i;
+
unsigned
int i;
Display *dpy = DisplayOfScreen (screen);
Display *dpy = DisplayOfScreen (screen);
- Window
vroot,
real_root;
+ Window real_root;
Window parent, *kids = 0;
unsigned int nkids = 0;
Window parent, *kids = 0;
unsigned int nkids = 0;
@@
-239,8
+233,8
@@
install_screen_colormaps (Screen *screen)
old_ehandler = XSetErrorHandler (BadWindow_ehandler);
error_handler_hit_p = False;
old_ehandler = XSetErrorHandler (BadWindow_ehandler);
error_handler_hit_p = False;
- vroot = VirtualRootWindowOfScreen (screen);
- if (XQueryTree (dpy,
v
root, &real_root, &parent, &kids, &nkids))
+ real_root = XRootWindowOfScreen (screen); /* not vroot */
+ if (XQueryTree (dpy,
real_
root, &real_root, &parent, &kids, &nkids))
for (i = 0; i < nkids; i++)
{
XWindowAttributes xgwa;
for (i = 0; i < nkids; i++)
{
XWindowAttributes xgwa;
@@
-266,7
+260,7
@@
install_screen_colormaps (Screen *screen)
void
void
-grab_screen_image (Screen *screen, Window window)
+grab_screen_image
_internal
(Screen *screen, Window window)
{
Display *dpy = DisplayOfScreen (screen);
XWindowAttributes xgwa;
{
Display *dpy = DisplayOfScreen (screen);
XWindowAttributes xgwa;