x11window: Skip strict geometry checks in isFullScreenable()

This addresses an issue where mpv window with keep aspect ratio enabled
cannot be fullscreened due to constrainClientSize() returning size that
doesn't fit full screen area.

NOTE: This has been tested with 3440x1440 display and 1920x1080 video in
      mpv.
This commit is contained in:
Łukasz Patron 2024-02-26 11:03:42 +01:00
parent 32be54b19d
commit 083318dddd
No known key found for this signature in database

View file

@ -1490,15 +1490,6 @@ bool X11Window::isFullScreenable() const
if (!rules()->checkFullScreen(true)) {
return false;
}
const bool isX11Mode = kwinApp()->operationMode() == Application::OperationModeX11;
if (rules()->checkStrictGeometry(isX11Mode)) {
// check geometry constraints (rule to obey is set)
const QRectF fullScreenArea = workspace()->clientArea(FullScreenArea, this);
const QSizeF constrainedClientSize = constrainClientSize(fullScreenArea.size());
if (rules()->checkSize(constrainedClientSize) != fullScreenArea.size()) {
return false; // the app wouldn't fit exactly fullscreen geometry due to its strict geometry requirements
}
}
// don't check size constrains - some apps request fullscreen despite requesting fixed size
return isNormalWindow() || isDialog(); // also better disallow only weird types to go fullscreen
}