Add helper to get FloatingWindow by its WId
This commit is contained in:
@@ -504,6 +504,16 @@ FloatingWindow *DockRegistry::floatingWindowForHandle(QWindow *windowHandle) con
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FloatingWindow *DockRegistry::floatingWindowForHandle(WId hwnd) const
|
||||
{
|
||||
for (FloatingWindow *fw : m_floatingWindows) {
|
||||
if (fw->windowHandle() && fw->windowHandle()->winId() == hwnd)
|
||||
return fw;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MainWindowBase *DockRegistry::mainWindowForHandle(QWindow *windowHandle) const
|
||||
{
|
||||
for (MainWindowBase *mw : m_mainWindows) {
|
||||
|
||||
@@ -95,6 +95,9 @@ public:
|
||||
///@brief returns the FloatingWindow with handle @p windowHandle
|
||||
FloatingWindow *floatingWindowForHandle(QWindow *windowHandle) const;
|
||||
|
||||
///@brief returns the FloatingWindow with handle @p hwnd
|
||||
FloatingWindow *floatingWindowForHandle(WId hwnd) const;
|
||||
|
||||
///@brief returns the MainWindow with handle @p windowHandle
|
||||
MainWindowBase *mainWindowForHandle(QWindow *windowHandle) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user