How to fully return X11 after fullscreen Wine game exits?

Questions about Wine on macOS.
Locked
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

How to fully return X11 after fullscreen Wine game exits?

Post by ischou »

I know this isn't technically a Wine problem or question, but I'm hoping someone else who uses wine on Mac OS X has already figured this out.

I just got Blades of Time and figured I'd try it out on Wine on Mac OS X to see if it works. Lo and behold, it works just fine on Wine 1.5.3 with raw3.patch.

The game changes the X screen resolution using xrandr, but when the game exits, it leaves the X server at the same resolution with the background completely black.

I issue a "xrandr -s 0" and the XQuartz returns to the correct native resolution. However, the black background is still there blocking my view of my desktop. I don't know if that's the root window or something else. I have to quit XQuartz to make the black background go away.

Does anyone know how to get rid of that black background after returning X to the correct native resolution?

Thanks in advance.
qparis
Level 2
Level 2
Posts: 44
Joined: Fri Dec 03, 2010 6:55 am

Post by qparis »

CMD + Q, followed by "Enter" should help you
doh123
Level 8
Level 8
Posts: 1227
Joined: Tue Jul 14, 2009 1:21 pm

Post by doh123 »

have you updated XQuartz lately?

to get the rootless window back you its not going to be -s 0 usually... you need to look through the xrandr list, but its going to be a resolution with the right X, but the Y will be 22 less than your actual Y. Say your screen is 1920x1200, the rootless resolution you want to switch back to will be 1920x1178... any other resolution and you have a black shielding window.
ischou
Level 4
Level 4
Posts: 109
Joined: Sun Nov 28, 2010 7:22 pm

Post by ischou »

qparis wrote:CMD + Q, followed by "Enter" should help you
Yes, that's what I've been doing, and I'd like to not have to do that.

Thanks, doh123, xrandr -s XRESxYRES-MENUBAR_HEIGHT did the trick. Adding that to my aliases now.

I was able to determine the exact dimensions using xdpyinfo.

A thousand thanks.
Locked