Bug 222210 - Weird behaviour with Alt+Tab and wine fullscreen applications
Summary: Weird behaviour with Alt+Tab and wine fullscreen applications
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 13:55 UTC by Johannes E. Krause
Modified: 2011-11-13 16:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes E. Krause 2010-01-11 13:55:57 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    openSUSE RPMs

i have witnessed this for quite a while now, and i'm not sure if it's a bug in wine or in kwin, or somewhere completely different.

the symptoms are:
when i start a game in wine in fullscreen mode, i can alt-tab out of it, but only if the window i alt-tab to is not maximised. as soon as i switch to a maximised window, or the whole screen is covered with non-maximised windows, the full screen game jumps to front display-wise, if i click with the mouse, the clicks go to the windows (that i don't see anymore)

it has been like this for several wine and kde versions, but not since the very beginning. i could not isolate when it started behaving this way.

KDE version is 4.3.4
wine version is 1.1.35
Graphics card is a Radeon 9700Pro, with fglrx driver 9.3 (last one that supports the card)
Comment 1 Johannes E. Krause 2010-01-11 14:37:55 UTC
I have also reported this in the wine bugzilla here:
http://bugs.winehq.org/show_bug.cgi?id=21327
Comment 2 Thomas Lübking 2010-01-11 16:10:31 UTC
do you use Desktop FX and does the problem persist when suspending* them before running the game?

*press ALT+SHIFT+F12
Comment 3 Johannes E. Krause 2010-01-11 16:27:38 UTC
Effects are already disabled in systemsettings->desktop
Comment 4 Thomas Lübking 2010-01-12 18:13:48 UTC
just to be sure then:
you don't use any kind of compositing (neither kwin desktop FX not compmgr) yet the game window is really in the foreground (updates content), BUT clicks are passed through to the windows beneath?

can you open rmb contextmenus (e.g. for konqueror, but by clicking into the game) and do they appear on top of the game window then? (and what game btw?)
Comment 5 Johannes E. Krause 2010-01-12 19:03:34 UTC
I disabled all effects because the graphics card isn't really all that powerful

~/.kde4/share/config/kwinrc says:
[Compositing]
Enabled=false      
[...]

and i'm not using compiz or anything either.

the effect is independent from the game, the games that i tested are "Siedler 2: Die Nächste Generation", "Civilization IV" and "SimCity 4"

when i right-click to open a context menu it draws the correct windows and the context menu for a short time, and then it redraws everything with the game (it does not show the context menu above the game)
Comment 6 Martin Flöser 2011-01-22 13:55:52 UTC
it sounds like a wine issue to me. Unfortunately I don't have wine installed or any Windows Game to test with.
Comment 7 Thomas Lübking 2011-01-22 17:17:24 UTC
i've none of those games, but it sounds as if "wine -> d3d -> gl" paints into an overlay and that is broken on that particular driver/gpu and (under certain conditions) paints unclipped into the framebuffer.

this may be related to
   Option "OpenGLOverlay" "1" # or "0"
in xorg.conf (which will however disable/enable xv acceleration)

I've tested with
- Jedi Academy (opengl game) -> can't alt + tab out of it. The game looses focus but stays on top.
- Maniac Mansion deluxe -> acts "normal", ie. i can alt+tab around.
- nvidia's dawn demo (pseudo fullscreen) -> just like MMD
Comment 8 Martin Flöser 2011-11-13 08:59:41 UTC
is this still an issue?
Comment 9 Johannes E. Krause 2011-11-13 12:24:08 UTC
yes, this still occurs with newer hardware and newer driver.

i also could produce problematic results with setting kaffeine/xine to OpenGL mode (instead of xv)
Comment 10 Thomas Lübking 2011-11-13 12:54:37 UTC
To make that clear: what you observe is an issue of the GPU's framebuffer/overlay handling. I assume it will not happen if you
a) enable compositing
b) keep it enabled
c) do NOT suspend compositing for fullscreen windows (3rd tab of "kcmshell4 kwincompositing")

This has however a performance impact and you likely don't want to do that when gaming (you want to completely suspend compositing before to have all resources open for the game, there's also a rule to automatically do that when such window appears)

The only thing kwin could effectively do in this regard was to disable alt+tab for fullscreen windows in general (what's very much likely just a "no-go")

What you could to is to setup a rule for that wine window to ignore global shortcuts ("kcmshell4 kwinrules", you can likely utilize the detection delay)

Have you ever tried the xorg radeon driver?
Comment 11 Johannes E. Krause 2011-11-13 15:14:09 UTC
(In reply to comment #10)
> Have you ever tried the xorg radeon driver?

sporadically. but last time i had overheating problems beacuse some energy saving features failed to trigger, and in general behaviour was IMHO worse. so i decided to not try that any time soon, and rather live with this behaviour.