Make Toplevel::window() virtual and implement in ShellClient

We need a shared window id in some way to e.g. properly support TabBox.
Though I do not like that the return value is xcb_window_t. This should
be either changed or a new "generic" windowId needs to be introduced.
This commit is contained in:
Martin Gräßlin 2015-05-21 10:46:12 +02:00
parent eec356494a
commit 45c1eddf4a
3 changed files with 7 additions and 1 deletions

View file

@ -386,4 +386,9 @@ bool ShellClient::isInternal() const
m_shellSurface->client() == waylandServer()->qtConnection(); m_shellSurface->client() == waylandServer()->qtConnection();
} }
xcb_window_t ShellClient::window() const
{
return windowId();
}
} }

View file

@ -86,6 +86,7 @@ public:
bool userCanSetFullScreen() const override; bool userCanSetFullScreen() const override;
bool userCanSetNoBorder() const override; bool userCanSetNoBorder() const override;
bool wantsInput() const override; bool wantsInput() const override;
xcb_window_t window() const override;
quint32 windowId() const { quint32 windowId() const {
return m_windowId; return m_windowId;

View file

@ -205,7 +205,7 @@ class Toplevel
public: public:
explicit Toplevel(); explicit Toplevel();
virtual xcb_window_t frameId() const; virtual xcb_window_t frameId() const;
xcb_window_t window() const; virtual xcb_window_t window() const;
QRect geometry() const; QRect geometry() const;
QSize size() const; QSize size() const;
QPoint pos() const; QPoint pos() const;