Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt: Add "renderer" window role to render window #8431

Merged
merged 1 commit into from Nov 8, 2019

Conversation

@flatulation
Copy link
Contributor

flatulation commented Oct 25, 2019

Under KDE, there's not really a good way to turn the desktop compositor off while a game is running in Dolphin. However, KWin (and most likely other window managers) can be configured to turn the compositor off when it sees a window with a certain window role (a string that can be attached to a window in X11). This 1-line change uses QWidget::setWindowRole to set the role of the render window to "renderer" on initialisation so the window manager can match it to a rule and is (I think) a non-op on other platforms (I don't know if it sets the app_id on Wayland though). I'm also trying to find a way to see if compositing can be blocked automatically, but I'm not sure it can be done without linking to another library (either dbus or libkf5windowsystem).

@BhaaLseN

This comment has been minimized.

Copy link
Member

BhaaLseN commented Oct 26, 2019

I don't suppose Qt provides a list of well-known roles anywhere to use instead of a magic string?
I wonder if it would make sense to leave a note/comment somewhere about what this does?

@stenzek
stenzek approved these changes Nov 8, 2019
Copy link
Contributor

stenzek left a comment

Not sure on the specific implications but the logic seems sound.

@stenzek stenzek merged commit 62f331d into dolphin-emu:master Nov 8, 2019
9 checks passed
9 checks passed
default Very basic checks passed, handed off to Buildbot.
Details
lint Build succeeded on builder lint
Details
pr-android Build succeeded on builder pr-android
Details
pr-deb-dbg-x64 Build succeeded on builder pr-deb-dbg-x64
Details
pr-deb-x64 Build succeeded on builder pr-deb-x64
Details
pr-freebsd-x64 Build succeeded on builder pr-freebsd-x64
Details
pr-osx-x64 Build succeeded on builder pr-osx-x64
Details
pr-ubu-x64 Build succeeded on builder pr-ubu-x64
Details
pr-win-x64 Build succeeded on builder pr-win-x64
Details
@flatulation

This comment has been minimized.

Copy link
Contributor Author

flatulation commented Nov 9, 2019

I should add I did ask around the kwin communication channels but I never got a specific answer, at some point I am going to find out how other applications do it without linking to dbus or KF5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.