-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
For a long time we have had reports about drag&drop freezing the Windows desktop in Bauhaus on Windows.
Turns out that this is a known issue inside Qt:
From qwidget.cpp:
/* Works only as long as pointer is inside the application's window, which is good enough for QDockWidget. Doesn't call SetWindowsHookEx() - this function causes a system-wide freeze if any other app on the system installs a hook and fails to process events. */ void QWidgetPrivate::grabMouseWhileInWindow() ...
and e.g. qdockwidget.cpp then does
#ifdef Q_OS_WIN
grabMouseWhileInWindow()
#else
grabMouse()
#endif
Interestingly, e.g. widgets/resizehandler.cpp again uses grabMouse(), even on Windows, which probably might lead to freezes there too ...
We should allow customers (& QtCreator) to do the very same 'tricks' we do internally to avoid lock-ups, and expose grabMouseWhileInWindow(). I'd even go for making it the default behavior on Windows, since 'misbehaving' programs that causes these freezes seems to be very common.