Ticket #214 (reopened usability)

Opened 4 years ago

Last modified 3 years ago

Windows don't come to front on focus (other WM)

Reported by: macosforge@… Owned by: jeremyhu@…
Priority: Important Milestone: later
Component: xserver Version: 2.3.2 (xserver-1.4.2-apple31)
Keywords: window focus obscured command tab redraw workspaces Cc: mmacleod@…

Description

Bug observed while testing release 2.3.2_rc4 on 10.5.6, Enlightenment 0.16.8 window manager, Gimp, Eterm 0.9.5, OS-X 10.5.6.

If I run another OS-X program, say Textedit, and command-tab back to X11, the X11 windows come forward as expected. However if I am in another OS-X program and click the mouse in one of the exposed X11 windows, X11 appears to be the front application in the menubar, and the X11 window selected will receive keyboard input, but the window doesn't come to the front and is partially obscured as it was before clicked on. If I click on the drag bar to move the X11 window, the entire window immediately comes to the front while I have mouse-down on the drag bar, but as soon as I let go the window becomes obscured again as if it was a background OS-X application. This problem happens in the rootless window mode (not full screen).

For reference, my window manager has 4 workspaces, one of which appears in the rootless window shared by other OS-X apps; X11 windows in other workspaces are in X11-land and don't normally appear as background windows when using other OS-X apps.

Additionally, X11 windows in the other 3 X11 workspaces are now getting an entirely different and serious display problem, in which the background is not being erased at all. As I drag windows around they leave a trail of windows behind them. Pop-up menus stay there forever. These are visual artifacts, the functionality of windows and menus work as expected.

Window manager was compiled in Aug 2008 under 10.5.4 and Xcode 3.1, just before the major X11 update in 10.5.5.

Discussed this issue on the xquartz-dev list and opening this ticket at Jeremy's request.

Attachments

Picture 1.jpg (376.5 KB) - added by macosforge@… 4 years ago.
Screen snap of Enlightenment "workspace #2" using 2.3.2_rc4
Picture 2.jpg (293.6 KB) - added by macosforge@… 4 years ago.
Screen snap of X11 rootless window (workspace #1) showing obscured terminal window while in focus
Picture 3.jpg (183.7 KB) - added by macosforge@… 4 years ago.
Picture 4.jpg (189.3 KB) - added by macosforge@… 4 years ago.

Change History

Changed 4 years ago by macosforge@…

Screen snap of Enlightenment "workspace #2" using 2.3.2_rc4

Changed 4 years ago by macosforge@…

Screen snap of X11 rootless window (workspace #1) showing obscured terminal window while in focus

comment:1 Changed 4 years ago by jeremyhu@…

  • Summary changed from Window focus and draw problem to Windows don't come to front on focus (other WM)

comment:2 follow-ups: ↓ 5 ↓ 6 Changed 4 years ago by jeremyhu@…

Did this ever work for you (like on Tiger or with 2.3.1)?

comment:3 Changed 4 years ago by jeremyhu@…

  • Milestone changed from 2.3.2 to 2.3.3

comment:4 Changed 4 years ago by mmacleod@…

  • Cc mmacleod@… added

Cc Me!

comment:5 in reply to: ↑ 2 Changed 4 years ago by macosforge@…

Replying to jeremyhu@…:

Did this ever work for you (like on Tiger or with 2.3.1)?

I assume you mean, did this window manager ever work without these problems described? YES.. It is the same window manager (same binary) I have been using to beta test X11 releases since day one. This wm worked fine under Apple's X11 official X11 release in 10.5.4 and 10.5.5, and on beta releases from this development list. This problem did not appear until 2.3.2_rc4, the one which introduced new code to fix the white rectangle problem.

I used the same window manager, but older binary, on Tiger, before 10.5 was released, also without any problem, using whatever X11 version came with the 10.4 release. I recompiled everything under 10.5.4.

comment:6 in reply to: ↑ 2 Changed 4 years ago by macosforge@…

FYI.. The problem is reproducible and consistent every time. I could capture information if it's useful.

The quartz window manager works fine on my system and I do not observe any bugs. I can edit my .xinitrc and select which wm I want to use. This problem seems to be specific to the Enlightenment window manager.

comment:7 follow-up: ↓ 8 Changed 4 years ago by jeremyhu@…

So, you're saying this change happened between 2.3.2_rc3 and 2.3.2_rc4 ???

comment:8 in reply to: ↑ 7 Changed 4 years ago by macosforge@…

Replying to jeremyhu@…:

So, you're saying this change happened between 2.3.2_rc3 and 2.3.2_rc4 ???

Yes, definitely. I was using the same wm binaries and never saw this problem until 2.3.2_rc4. It's definitely a show-stopper for Enlightenment wm.

comment:9 Changed 4 years ago by jeremyhu@…

2.3.2_rc3 had xorg-server-1.4.2-apple27 ... 2.3.2_rc4 had xorg-server-1.4.2-apple28 ... here's the list of changes between the two... there's nothing even hinting at this bug you're reporting... except maybe the "white rectangle fix" ... have you tried the later versions?

10 days 1.4.2-apple28 Jeremy Huddleston 1 -1/+1 10 days XQuartz: Get rid of white rectangle bug Jeremy Huddleston 1 -2/+5 10 days rootless: Make expose_1 static Jeremy Huddleston 1 -1/+1 10 days glXDRIbindTexImage: Fail if no texture bound to pixmap's texture target. Michel Dänzer 1 -7/+10 10 days XQuartz: Name the startup shell script X11 for better compatability Jeremy Huddleston 4 -11/+11 2008-12-13 XQuartz: Updated menu item ordering for better HIG compliance Jeremy Huddleston 2 -101/+89 2008-12-11 XQuartz: Tiger fix, don't call Xplugin code in the Appkit thread if Xplugin i... Jeremy Huddleston 1 -0/+5 2008-12-10 XQuartz: Fix path to executable Jeremy Huddleston 1 -1/+1 2008-12-10 XQuartz: fixed make dist Jeremy Huddleston 2 -1/+2 2008-12-10 XQuartz: Make debugging output for invalid depths a bit more detailed Jeremy Huddleston 1 -2/+2 2008-12-10 XQuartz: Avoid using login /bin/sh blech. Just use a bash script to start th... Jeremy Huddleston 4 -67/+104 2008-12-09 XQuartz: unset DISPLAY if we didn't get a launchd socket handoff Jeremy Huddleston 1 -0/+10 2008-12-09 XQuartz: unsetenv(DISPLAY) if we're not org.x.X11 Jeremy Huddleston 7 -29/+101 2008-12-06 1.4.2-apple27 Jeremy Huddleston 1 -1/+1

comment:10 follow-up: ↓ 11 Changed 4 years ago by jeremyhu@…

Try this updated X11.bin ...

curl -LO http://people.freedesktop.org/~jeremyhu/X11.bin-20081223.bz2
bunzip2 X11.bin-20081223.bz2
sudo cp X11.bin-20081223 /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
sudo chmod 755 /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
sudo chown root:admin /Applications/Utilities/X11.app/Contents/MacOS/X11.bin

comment:11 in reply to: ↑ 10 Changed 4 years ago by macosforge@…

Replying to jeremyhu@…:

Try this updated X11.bin ... http://people.freedesktop.org/~jeremyhu/X11.bin-20081223.bz2

I installed this updated bin, and the problem is still there.

I believe I had already updated this X11.bin at the same time I installed 2.3.2_rc4, but I forgot to mention that in my description. In any case, I replaced it again, so we know I am using the latest X11 binary.

This problem was definitely not there in 2.3.2_rc3.

comment:12 Changed 4 years ago by jeremyhu@…

Well, I don't see any changes between xorg-server-1.4.2-apple27 and xorg-server-1.4.2-apple28 that could cause this problem.

Please just humor me... can you try using http://static.macosforge.org/xquartz/downloads/archive/X11-1.4.2-apple27.bz2

curl -LO http://static.macosforge.org/xquartz/downloads/archive/X11-1.4.2-apple27.bz2
bunzip2 X11-1.4.2-apple27.bz2
sudo cp X11-1.4.2-apple27 /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
sudo chmod 755 /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
sudo chown root:admin /Applications/Utilities/X11.app/Contents/MacOS/X11.bin

That's the same xorg-server that was in 2.3.2_rc3. If that works and 2.3.2_rc4 doesn't, then there's not much more I can really blame this on... but I want to make sure that it is this binary and not something that changed outside of the server binary itself...

comment:13 Changed 4 years ago by jeremyhu@…

  • Milestone changed from 2.3.3 to 2.3.2

comment:14 Changed 4 years ago by macosforge@…

I installed X11-1.4.2-apple27 and the problem is still there.

My bad for assuming the problem was 2.3.2_rc4. I'm usually pretty careful about reporting, my apologies. Thanks very much for suggesting the version regression. Apparently the window focus problem has been there for a while, but I only recently observed it. The redraw problem prompted me to do more exhaustive testing than I had before.

I spent some time backtracking my steps, reset my window manager and deleted its cache.

After this global wm reset, the window focus problem is still there, but the redraw error I previously saw in workspaces 2-4 appears to be gone. After this reset I see some changes in X11: (1) command-tab now switches to other OS-X apps from X11, didn't before; (2) If I am in workspace 2 and command-tab to another OS-X app, workspace 2 desktop remains in the background, didn't before; Different, but not a problem.

I re-installed X11.bin-20081223 and retested, and there is no difference between 1.4.2-apple27 and 20081223, with respect to this issue. The only difference I saw was that a new terminal window appeared by default on my other display (I'm using 2 displays.) Not a problem either.

With the redraw bug apparently gone, the severity of this window focus bug is not as great. X11 is useable as long as I leave windows un-obscured, or use the other workspaces. I'm happy to do further testing.

comment:15 Changed 4 years ago by jeremyhu@…

Ok, well since this isn't "new", I'm going to make it a future milestone.

Did you ever attempt this with older X11s? It would be nice if you could tell me which version of X11 this broke in... Did it work in 2.2.0?

You can nuke your X11 to install older versions (it should work by just running the installer, but there's a bug in the package maker that causes it to not always work) by following the instructions here:

http://xquartz.macosforge.org/trac/wiki/X11-UsersFAQ#Messeditupgotconfusedwanttostartover

comment:16 Changed 4 years ago by jeremyhu@…

  • Milestone changed from 2.3.2 to 2.3.3

comment:17 follow-up: ↓ 18 Changed 4 years ago by jeremyhu@…

  • Version changed from dev (xorg-server-1.5-apple) to 2.3.2 (xserver-1.4)
  • Milestone changed from 2.3.3 to 2.4.0

Still waiting on feedback...

comment:18 in reply to: ↑ 17 Changed 4 years ago by macosforge@…

Sorry for the long delay, I didn't realize that was holding things up. Thanks for being persistent.

I just wiped my X11 distro according to the FAQ, and installed 2.2.0.1. The bug is present on that as well. This bug may have always been present on 10.5, or since the time my WM binaries and libraries were created under 10.5.

While checking out the 2.2.0.1 distro, I made an observation that the "hiding" active window that pops up only when grab bar is clicked, shows the same symptoms against some X11 window manager components. In Enlightenment WM, it is possible to have two "workspaces" visible at the same time on the screen. The Focused xterm window shows the same "not coming to front" bug against one of the WM workspaces as it does with the Aqua apps in the background. Seems the "hiding" behavior is not limited to Aqua apps.

The possibility this is due to code in the WM cannot be ruled out. With regard to whether this is a bug or feature of the WM, I used Enlightenment extensively under Linux and never saw this "not coming to front on focus bug" against other X11 components. I also don't remember seeing it under 10.4/Fink (in the day). I'm pretty sure it's not the intended behavior of the WM, although the possibility cannot be ruled out that it has always been this way, or that it is due to something compiled into my WM binaries that are different from a Linux system.

I'm happy to continue to help with whatever testing might be useful in checking into this.

Changed 4 years ago by macosforge@…

Changed 4 years ago by macosforge@…

comment:19 Changed 4 years ago by jeremyhu@…

  • Status changed from new to closed
  • Resolution set to duplicate

dupe of bug #192

This is related to the checkbox in spaces preferences for 'when activating an application, goto a space containing that app'

comment:20 Changed 4 years ago by jeremyhu@…

  • Status changed from closed to reopened
  • Resolution duplicate deleted
  • Milestone changed from 2.4.0 to 3.0

whoops, I closed the wrong bug... this is not a dupe of #192

Note: See TracTickets for help on using tickets.