Skip to content

fix(screen-time): resolve active app through CompositorPlatform on KDE - #4135

Open
mdj2812 wants to merge 3 commits into
noctalia-dev:mainfrom
mdj2812:fix/screen-time-compositor-platform
Open

fix(screen-time): resolve active app through CompositorPlatform on KDE#4135
mdj2812 wants to merge 3 commits into
noctalia-dev:mainfrom
mdj2812:fix/screen-time-compositor-platform

Conversation

@mdj2812

@mdj2812 mdj2812 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Route screen time focus tracking through CompositorPlatform::activeToplevel() so KWin-based compositors (e.g. KineticWE) use the Kwin active-window backend instead of wlr-foreign-toplevel activation state
  • Extend CompositorPlatform with compositor-aware active output resolution and activateToplevelForAppId(), and use them for brightness IPC and settings refocus

Test plan

  • Enable screen time on KineticWE, switch between apps, confirm usage accumulates in Control Center
  • Verify screen time still works on Umbriel / wlr-foreign-toplevel compositors
  • Reopen settings while already open and confirm the existing window is refocused on KDE
  • Run noctalia msg brightness-up current on KDE and confirm it targets the focused monitor
Screenshot_20260827_220633

Made with Cursor

@mdj2812

mdj2812 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

CI failed due to this case: icon_resolver_test. Should not be related though. Likely caused by this earlier commit: 518c47c

@mdj2812
mdj2812 force-pushed the fix/screen-time-compositor-platform branch from 53bb97d to 1da1826 Compare August 28, 2026 06:41
mdj2812 and others added 3 commits August 30, 2026 15:57
Screen time tracked focus via WaylandConnection directly, which misses
the focused window on KWin-based compositors that rely on the Kwin active-
window backend instead of wlr-foreign-toplevel activation state.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use compositor-aware active output resolution and app activation for
brightness IPC and settings refocus, matching the KWin backend path
already used by the taskbar and dock.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@mdj2812
mdj2812 force-pushed the fix/screen-time-compositor-platform branch from 1da1826 to 92238dd Compare August 30, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant