diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-09-22 14:58:02 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-09-22 20:23:27 +0800 |
commit | 70e9404912e0047f14861abc8d4e3982c23685fd (patch) | |
tree | ed2d7bb13a5973687b8a2c640810b7583773bba0 /include | |
parent | 444e628d22db67742181ae14ae2ed0a9c2b6cd67 (diff) | |
download | cru-70e9404912e0047f14861abc8d4e3982c23685fd.tar.gz cru-70e9404912e0047f14861abc8d4e3982c23685fd.tar.bz2 cru-70e9404912e0047f14861abc8d4e3982c23685fd.zip |
Impl RequestFocus of xcb window.
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/platform/gui/Window.h | 2 | ||||
-rw-r--r-- | include/cru/platform/gui/xcb/Window.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/cru/platform/gui/Window.h b/include/cru/platform/gui/Window.h index 742ef798..f877545e 100644 --- a/include/cru/platform/gui/Window.h +++ b/include/cru/platform/gui/Window.h @@ -72,6 +72,8 @@ struct INativeWindow : virtual IPlatformResource { // The lefttop of the rect is relative to screen lefttop. virtual void SetWindowRect(const Rect& rect) = 0; + // Return true if window gained the focus. But the return value should be + // ignored, since it does not guarantee anything. virtual bool RequestFocus() = 0; // Relative to client lefttop. diff --git a/include/cru/platform/gui/xcb/Window.h b/include/cru/platform/gui/xcb/Window.h index ba4798a5..346cbd55 100644 --- a/include/cru/platform/gui/xcb/Window.h +++ b/include/cru/platform/gui/xcb/Window.h @@ -42,7 +42,7 @@ class XcbWindow : public XcbResource, public virtual INativeWindow { Rect GetWindowRect() override; void SetWindowRect(const Rect& rect) override; - virtual bool RequestFocus() = 0; + bool RequestFocus() override; // Relative to client lefttop. virtual Point GetMousePosition() = 0; |