summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-06-15glamor: Use glamor_program and GL_LINES for 0-width linesKeith Packard6-192/+361
GL lines are nearly X compliant; you just need to fill in the last pixel when the client hasn't requested CapNotLast. v2: switch to glamor_make_current v3: use miPolylines instead of custom glamor fallback path. Wrap code to 80 columns. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-15glamor: Use glamor_program for glamor_push_pixelsKeith Packard1-88/+66
This uses the same shaders as glamor_poly_glyph_blt. v2: Wrap some long lines (changes by anholt). Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-15glamor: Add glamor_program based copy accelerationKeith Packard13-789/+763
Paints with textures, using a temporary buffer for overlapping copies Performs CPU to GPU transfers for pixmaps in memory. Accelerates copy plane when both objects are in the GPU. Includes copy_window acceleration too. v2: Use NV_texture_barrier for non-overlapping copies within the same drawable v3: Switch to glamor_make_current v4: Do overlap check on the bounding box of the region rather than on individual boxes v5: Use Eric Anholt's re-written comments which provide a more accurate description of the code v6: Use floating point uniform for copy plane bit multiplier. This avoids an int to float conversion in the copy plane fragment shader. Use round() instead of adding 0.5 in copy plane. round() and +0.5 end up generating equivalent code, and performance measurements confirm that they are the same speed. Round() is a bit clearer though, so we'll use it. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Markus Wick <markus@selfnet.de>
2014-06-15glamor: Directly reference the private key recordsKeith Packard2-15/+14
There's no reason to use a pointer here, it just wastes time. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-15glamor: Replace fallback preparation codeKeith Packard9-190/+346
These offer a simpler and more efficient means for temporarily transitioning to CPU-accessible memory for fallback implementations. v2: Do not attempt fallbacks with GLAMOR_DRM_ONLY pixmaps glamor cannot transfer pixels for GLAMOR_DRM_ONLY pixmaps using glReadPixels and glTexSubImage2D, and so there's no way to perform fallback operations with these pixmaps. v3: Clear ->pbo field when deleting the PBO. Otherwise, we'd reuse the old name next time we fall back on the pixmap, which would potentially conflict with some other pixmap that genned a new name, or just do a lazy allocation of the name (compat GL context, like we currently use) or error out (core GL context, like we hope to use some day). Also, style fixes. Changes by anholt, acked by keithp. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-15mi: Draw multiple lines in one FillSpans call in miZeroLineKeith Packard1-8/+8
miZeroLine allocates enough space to draw a line spanning the entire width/height of the target drawable. When drawing multiple shorter lines, this leaves most of the space in that buffer unfilled. Let multiple lines be drawn into the buffer if there is plenty of space. Speeds up glamor fallback zero-width lines: Before 6000000 trep @ 0.0020 msec (508000.0/sec): 1-pixel line 6000000 trep @ 0.0020 msec (492000.0/sec): 10-pixel line 6000000 trep @ 0.0023 msec (427000.0/sec): 100-pixel line 4000000 trep @ 0.0035 msec (282000.0/sec): 500-pixel line After: 600000000 trep @ 0.0000 msec (43400000.0/sec): 1-pixel line 140000000 trep @ 0.0001 msec (13000000.0/sec): 10-pixel line 16000000 trep @ 0.0008 msec (1300000.0/sec): 100-pixel line 4000000 trep @ 0.0038 msec (261000.0/sec): 500-pixel line (500 pixel lines do not change in performance because the buffer can only one one of them.) Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12mi: Fill spans for multiple arcs in miPolyFillArcKeith Packard1-79/+67
This allocates span data for multiple arcs and draws the whole set in one call, rather than doing them one at a time. For modern hardware, this is a significant performance improvement. v2: Limit the number of spans per buffer to 4M to avoid integer overflow in computing the malloc size. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12mi: Make miPolyArc draw fast zero-width when possibleKeith Packard3-2/+16
Instead of forcing drivers to figure out when to call miZeroPolyArc, have miPolyArc call that when possible. This involved renaming the existing miPolyArc call to miWideArc and creating a new miPolyArc wrapper function as miZeroPolyArc falls back to miWideArc when the arc is too large to be drawn with the zero-width code (ellipses larger than 800x800). Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12mi: Create miPolylines as a general-purpose line drawing functionKeith Packard2-0/+26
Instead of requiring all drivers to figure out which mi function to call for each of the four cases, create a single wrapper in mi that handles them correctly. Now drivers can simply use miPolylines in all cases. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12ephyr: Deal with non-root visual for windowKeith Packard1-10/+21
glx will sometimes select a non-root visual, deal with that by creating a suitable colormap and using that instead of attempting to use the default colormap. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-06mi: Build fix: mieqProcessDeviceEvent returns voidJeremy Huddleston Sequoia1-1/+1
mieq.c:520:9: error: void function 'mieqProcessDeviceEvent' should not return a value [-Wreturn-type,Semantic Issue] return 0; ^ ~ 1 error generated. Regression-from: 9fb08310b51b46736f3ca8dbc04efdf502420403 Found-by: Tinderbox Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-04Update to version 1.15.99.903Keith Packard1-3/+3
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04mi: don't process events from disabled devices (#77884)Peter Hutterer2-1/+17
Once a device is disabled, it doesn't have a sprite pointer anymore. If an event is still in the queue and processed after DisableDevice finished, a dereference causes a crash. Example backtrace (crash forced by injecting an event at the right time): (EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f] (EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240] (EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389] (EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720] (EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58] (EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457] (EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7] (EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb] (EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6] (EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748] (EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9] (EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28] (EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65] (EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69] (EE) 15: ? (?+0x29) [0x29] xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and DisableDevice() calls mieqProcessInputEvents() again when flushing touches and button events. Between that and disabling the device (which causes new events to be refused) there is a window where events may be triggered and enqueued. On the next call to PIE that event is processed on a now defunct device, causing the crash. The simplest fix to this is to discard events from disabled devices. We flush the queue often enough before disabling that when we get here, we really don't care about the events from this device. X.Org Bug 77884 <http://bugs.freedesktop.org/show_bug.cgi?id=77884> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04present: Queue flips for later executionKeith Packard2-38/+89
When a flip (or unflip) is pending and a flip request comes in, leave it queued until the pending flip completes and then execute it. This fixes a bug where an application submitting back-to-back present_pixmap requests for sequential frames would alternate between flipping and copying as the pending flip would cause the new present_pixmap request to not use a flip. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Frank Binns <frank.binns@imgtec.com>
2014-06-04xfixes: disable cursor on X server resetFrank Binns1-0/+2
The initial state of the cursor is set to disabled but this was never be re-disabled during X server reset. This meant any application run after an X server reset would have the cursor displayed even if it hadn't requested this to be the case. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04dix: fix pixmap leak on server resetBrendan King1-4/+3
The server is leaking a pixmap (created by CreateDefaultStipple()) on reset. The leak is caused by some X Server graphics contexts not being freed on reset by the machine independent cursor code in the server, which in turn is caused by the cursor cleanup code (miSpriteDeviceCursorCleanup()) not being called. Ensures the DeviceCursorCleanup() function is called when the associated input device is closed on server reset. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04dix: reference the cursor just once in InitializeSprite()Brendan King1-1/+1
The new current cursor was being referenced twice, resulting in a memory leak when the current server generation ended. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-04fb: fix screen pixmap leak on server resetBrendan King1-1/+1
Call FreePixmap() instead of free() to destroy the screen pixmap in fbCloseScreen(). Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02xfree86: Report Present as a built-in moduleChris Wilson1-0/+3
This is so that drivers can do a runtime check that Present is available, similar to existing runtime checks performed by the drivers for DRI. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02xfree86: Report DRI3 as a built-in moduleChris Wilson1-0/+3
This is so that drivers can do a runtime check that DRI3 is available, similar to existing runtime checks performed by the drivers for DRI and DRI2. v2: Only add DRI3 to the list if the module was actually built into the server (Mark Kettenis). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mark Kettenis <mark.kettenis@xs4all.nl> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02Merge remote-tracking branch 'jturney/master'Keith Packard2-12/+4
2014-06-02xtensa: add support for xtensa architectureMax Filippov3-2/+20
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02Merge remote-tracking branch 'jeremyhu/master'Keith Packard3-21/+15
2014-06-02xfree86: Add "modesetting" to list of fallback driversSøren Sandmann1-1/+1
To make X -configure work properly, the output of fixup_video_driver_list() should be in order of preference. Otherwise, the config file may use the incorrect driver for some devices. In particular, the drivers that work for all (or many) devices need to be last in the list. Since the modesetting driver works for many devices, it needs to be considered a fallback driver. Signed-off-by: Søren Sandmann <ssp@redhat.com> Acked-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02Merge remote-tracking branch 'whot/for-keith'Keith Packard5-52/+40
2014-06-02Fix overflow checking extension versionsRobert Ancell1-7/+11
The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02configure: Require sufficiently new wayland-client for xwayland ddxAdam Jackson1-1/+1
The explicit release requests were added in 1.3.0, don't try to build against older. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is usedJon TURNEY1-0/+3
Commit f37a46913489397d8628ffe578c8d4ed50b6ca72 removed this from xwin-config.h.in for some reason, but it is used. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-06-02hw/xwin: Update for __glXLastContext -> lastGLContextJon TURNEY1-12/+1
Update for __glXLastContext -> lastGLContext. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-05-31XQuartz: Update logic to account for title bar on every display in MavericksJeremy Huddleston Sequoia1-3/+13
<rdar://problem/14205847> http://xquartz.macosforge.org/trac/ticket/832 Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31XQuartz: Dead code removal (ENABLE_DEBUG_LOG)Jeremy Huddleston Sequoia1-16/+0
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31XQuartz: Bump to 2.7.7Jeremy Huddleston Sequoia1-2/+2
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-24man: drop specific mention of DontZap in -retro (#71113)Peter Hutterer1-3/+2
DontZap off is the default anyway, don't mention it specifically to avoid confusion X.Org Bug 71113 <http://bugs.freedesktop.org/show_bug.cgi?id=71113> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-24xfree86: fix wrong DontZap documentation (#71113)Peter Hutterer1-1/+1
X.Org Bug 71113 <http://bugs.freedesktop.org/show_bug.cgi?id=71113> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-23Fix overflow checking extension versionsRobert Ancell1-7/+11
The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-05-22glx: Require at least one True/DirectColor visualAdam Jackson1-0/+21
Mesa no longer supports rendering to anything less. GLX 1.2 requires that the server advertise at least one GLX visual. GLX 1.3 and 1.4 are more subtle: they require at least one fbconfig capable of window rendering, and _also_ require that window-capable fbconfigs have a non-zero value for the GLX_VISUAL_ID. In either case we should refuse to init GLX if there's not at least one GL-capable visual on at least one screen. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-23Xi: block SIGIOs while copying device classes aroundSteven McDonald1-0/+4
I've been seeing sporadic (anywhere from once every few days to 3-4 times a day) crashes and freezes in X. The problematic behaviour isn't always the same, but I chose a particular incident to debug, and found that X was segfaulting in updateMotionHistory, on line 575 of dix/getevents.c. After some further investigation, I found that the bug was being triggered when a SIGIO was received in DeepCopyPointerClasses, between the AllocValuatorClass call (line 540) and updating the to->valuator pointer (line 545). AllocValuatorClass calls realloc() on to->valuator, so between these lines, it's not guaranteed to point to allocated memory. It seems the SIGIO handler is calling updateMotionHistory, which is reading the memory pointed to by to->valuator and getting a wrong value for last_motion, which updates buff to point to wildly the wrong place and thus generates a segfault when a memcpy() is done into buff. I am attaching a patch which I've been running on that machine for the past three days, and haven't yet observed any more crashing or freezing behaviour. The patch simply calls OsBlockSIGIO while DeepCopyDeviceClasses is in progress, as the state of the X server's device data structures is not guaranteed to be in a consistent state during that time. Debian bug#744303 <https://bugs.debian.org/744303> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-23os: automatically switch to sigsafe logging when neededPeter Hutterer1-32/+33
If we're smart enough to warn, we should be smart enough to just pass it through to the right function. Worst case we lose some formatting specifiers which pnprintf will complain about anyway. And in most cases it won't matter. This requires renaming pnprintf to vpnprintf and changing the size_t to int to be compatible with Xvscnprintf. pnprintf is internal only, the others are exported API so we can't change them as easily. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-05-22shadowfb: Fix initializationAdam Jackson1-11/+15
This has to run at initial CreateWindow time, at CreateScreenResources the root window doesn't actually exist yet. Tested-by: Michael Thayer <michael.thayer@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Michael Thayer <michael.thayer@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2)Adam Jackson1-0/+2
v2: Fix another path spotted by keithp Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22dmx: Fix memory leak in dmxBELoadFont (#50281)Adam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22dri2: Fix detection of wrong prime_id in GetScreenPrime.Michal Srb1-4/+2
Checking the iterating variable ("slave") against null can not detect if the xorg_list_for_each_entry finished without break being invoked - slave variable will be always non-null. This caused segfault whenever someone tried to use DRI_PRIME with incorrect id while having at least one render offloading slave configured. Restructurize the GetScreenPrime to work as expected. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22ARC: Add support for ARC architectureAlexey Brodkin3-3/+17
Xorg server could be built for and run on Synopsys DesignWare ARC cores. These changes are required for successful building and execution of the server. Both little-endian and big-endian flavors of ARC cores are supported. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Egbert Eich <eich@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-15config: revert quirk for the Evoluent Vertical MousePeter Hutterer1-16/+0
This quick makes the mouse behaviour more obvious (LMR buttons generate LMR events) but goes against the manufacturer's intended defaults: Top button - left click. Wheel button - .middle click (e.g., for pan and rotate in CAD programs). Middle button - right click. Bottom button - back. Thumb button - forward. from http://www.evoluent.com/vm3.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-12rrcrtc: brackets are hard, lets go shopping.Dave Airlie1-3/+4
Slaving two outputs on a secondary GPU to a primary GPU testing picked this up, in that we'd try to resize to the totally the wrong thing, then as usual segfault in the rotation code. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2014-05-12glamor: Don't forget to check whether we can fall back in polysegment.Eric Anholt1-3/+8
Part of the _nf contract is that glamor will only return FALSE if glamor has checked that UXA can actually map the pixmaps (UXA only allocates the BO itself in the screen pixmap and DRI2 cases, and can't map it otherwise). Fixes server segfaults zooming in and out of libreoffice spreadsheets. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-12xfree86: fix warnings after MatchSeat patchLaércio de Sousa1-12/+12
This patch fixes some compile warnings that arise after commit 7070ebeebaca1b51f8a2801989120784a1c374ae (xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout") available at git repository git://people.freedesktop.org/~whot/xserver for-keith Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-12glamor: Stop disabling asserts by default.Eric Anholt1-3/+0
Disabling asserts is something the user gets to manage. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-08Xi: don't copy a DeviceEvent into an InternalEventPeter Hutterer1-8/+8
==26141== Invalid read of size 8 ==26141== at 0x58FAEA: DeliverEmulatedMotionEvent (exevents.c:1484) An InternalEvent is bigger than a DeviceEvent, thus copying one to the other reads past the allocated boundary. Shouldn't have any real effect since we shouldn't access anything past the DeviceEvent boundary if the event type is correct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-05-08mi: start calculating the sprite trace from the first child of rootPeter Hutterer1-1/+1
Introduced in 73698d41e41ce76bef2d9a90b46ac0c24ae148dd "Make XYToWindow a screen function" Moving the code into miwindow.c changed the start of the loop from RootWindow()->firstChild to DeepestSpriteWindow(). This function is only supposed to be called from miXYToWindow which resets spriteTraceGood to 1, thus DeepestSpriteWindow() is always the root window anyway. What got dropped was the firstChild as the first window to handle, so we may end up with the root window twice in the sprite trace. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>