Re: Backing store 'always' windows & window mapping
Re: Backing store 'always' windows & window mapping
- Subject: Re: Backing store 'always' windows & window mapping
- From: "Torrey T. Lyons" <email@hidden>
- Date: Wed, 28 Jan 2004 12:10:46 -0800
At 5:11 PM -0600 1/26/04, Matthew Klahn wrote:
On Jan 26, 2004, at 16:45 , Torrey T. Lyons wrote:
2. When you remap the windows, if you drag another window over the
top of them, do you get their contents refreshed? My guess would be
yes.
Yes, this is fine. You can drag windows over it and its contents are fine.
3. How are you directing the windows to be unmapped/remapped btw?
Both XDarwin and X11.app don't properly handle windows being
unmapped from underneath them by calling through the native Mac OS
X API's. X11.app made a stab at handling cases like this, but it is
not really complete. It keeps the window in the X server's stack of
on screen windows but hacks several parts of the dix layer to make
these windows unhittable. XDarwin does not do anything special and
just treats unmapped windows as if they are still on screen.
We actually call XMapWindow(Display *, Window) and
XUnmapWindow(Display *, Window) (well, we can't directly rely on the
X11 libraries even being installed, so we dlsym these functions into
pointers if we see that X11.app has been launched, and find the
library's location), so the calls are actually going to the X
server, and we don't rely on Carbon/Cocoa functions to unmap & map
the windows.
I see; I was confused about how you were doing the window mapping.
I've looked into this a bit more and you've stumbled on an
interesting series of related "bugs". IDL is bugged as noted by
others in that it shouldn't rely on backing store. It is getting sent
an expose event for the remapped windows and then ignoring it. Bad
IDL.
On the other hand, the X server (X11.app or XDarwin) is not handling
this ideally either. As you can see from a window drag over the
effected window, the window contents are still intact. The X server
should just automatically refresh them on the remap. At the same
time, the X server does not need to send out an expose event since it
has a valid buffered copy of the window contents. Sending the
unneeded expose event is okay, but the X server could be much more
efficient on window remaps by just refreshing from the window backing
buffer.
It is quite easy to put in the refresh from backing store on remaps.
If this was perceived as an important bug, we could even put it into
XFree86 4.4.0. Optimizing away the extraneous expose event is harder,
however. This optimization is definitely something to add after 4.4.0
is finalized.
4. Note that XDarwin will properly handle being told to Hide
itself. X11.app might handle Hide if quartz-wm is the window
manager running. (X11.app + quartz-wm does handle Hide from the
menu, not sure about an AppleEvent.) XDarwin is much more
"forgiving" in the sense that it lets quartz-wm handle things if it
is running, but takes over if a less "Mac OS X savvy" window
manager is being used.
Hiding the application while X11.app is running will also cause this
particular problem with IDL. All of this testing is with quartz-wm,
by the way. I haven't tried starting up XDarwin by itself, but I can
try that if you think that would not display this particular problem.
My prediction: XDarwin will display the same behavior if quartz-wm is
running. With another window manager, XDarwin will work correctly.
(XDarwin strives for complete compatibility with X11.app if quartz-wm
is around.)
Please let me know, though, if you do decide for XFree86 4.4.0 will
handle this, and I'll pass that along to our (mutual) customers.
Thanks very much for your help!
With the refresh change XFree86 would handle this. However, since
this seems to be something users can configure in IDL, I'm unclear
whether it is worth making a change this late in the release cycle.
Has anyone verified whether the workarounds proposed by others are
successful?
--Torrey
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
X11 for Mac OS X FAQ: http://developer.apple.com/qa/qa2001/qa1232.html
Report issues, request features, feedback: http://developer.apple.com/bugreporter
Do not post admin requests to the list. They will be ignored.