Bug 493669 - Kwin cannot tell if a window is full-screen
Summary: Kwin cannot tell if a window is full-screen
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (show other bugs)
Version: 6.1.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-26 04:20 UTC by Alberto Salvia Novella
Modified: 2024-09-29 14:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Salvia Novella 2024-09-26 04:20:57 UTC
Using the Kwin QML scripting API, with many full-screen apps:
- "window.fullscreen" reports false.
- "window.size" reports less size than `Workspace.workspaceSize`.

Samples:
- prodeus.exe: fullScreen: true
- firefox: fullScreen: false: QSizeF(1836, 1080) vs QSize(1920, 1080)
- dosbox-staging: fullScreen: false: QSizeF(1836, 1080) vs QSize(1920, 1080)
- The Dark Mod: fullScreen: false: QSizeF(1836, 1080) vs QSize(1920, 1080)

Since Kwin ditched the previous API, suddenly nothing works. And I can fix jeez.
Comment 1 Zamundaaa 2024-09-26 14:20:28 UTC
It sounds like those windows are maximized with a panel on the left, and not actually fullscreen?
Comment 2 Alberto Salvia Novella 2024-09-26 22:43:57 UTC
There is a panel on the left, but the window is fullscreen and the panel invisible.

My hypothesis is that most full screen windows are started windowed, and inmediately go fullscreen being the change invisible to the naked eye. But the function only catches the first state when called from a signal, as there is no delay.

But I haven't investigated it further yet.
Comment 3 Alberto Salvia Novella 2024-09-29 10:21:44 UTC
Okay, if I make the script wait 100ms it tells the correct resolution.

So I was right: "fullscreen" cannot tell the resolution if the window is being started, as first it goes windowed to fullscreen.
Comment 4 Alberto Salvia Novella 2024-09-29 14:15:49 UTC
This only happens with the signal "windowAdded", but not with "windowActivated"