Bug 346361

Summary: KIdleTime hangs on Wayland
Product: [Frameworks and Libraries] frameworks-kidletime Reporter: Giulio Camuffo <giuliocamuffo>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Giulio Camuffo 2015-04-19 13:43:09 UTC
I noticed this when trying konversation kf5 on wayland, as it hangs on startup.
Konversation uses KIdleTime, and KIdleTime has WidgetBasedPoller which, apart of just not working on wayland (even if it didn't hang), it sets the Qt::X11BypassWindowManagerHint flag, which on qt5 is the same as Qt::BypassWindowManagerHint. The qtwayland QPA plugin doesn't create a wl_shel_surfacel/xdg_surface if a window has that flag, meaning basically that if it draws it will hang waiting for an event from the compositor that will never come, unless you also do some explicit wayland stuff.

I'm not sure how you would implement a working KIdleTime backend for wayland right now, but imho it should at least not hang.

Happens with Qt(Wayland) 5.4 and 5.5, KIdleTime 5.9.0.

Reproducible: Always
Comment 1 Martin Flöser 2016-06-21 15:38:56 UTC
This is fixed in multiple ways:
1) Qt doesn't freeze anymore when creating Qt::BypassWindowManager hints
2) There is a KIdleTime implementation for Wayland in kwayland-integration which won't freeze even if the required interfaces are not present.