diff options
author | Campbell Barton <campbell@blender.org> | 2022-06-14 08:07:24 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-06-14 08:07:24 +0300 |
commit | f001c857722a8d7ebfc647be54f1a9cb3b2972c4 (patch) | |
tree | d143ff6f9e53d17ee55bfdfa9b9f592eeee952e8 /intern | |
parent | 97f894881cab339eacbf69738ea7c5f687c5179d (diff) |
Cleanup: don't define wayland window methods as private
This meant the system couldn't call window methods unless the window
was cast to GHOST_Window.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWayland.h | 43 |
2 files changed, 24 insertions, 21 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index 75e06abdc87..dceff4ef2b4 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -2560,7 +2560,7 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorGrab(const GHOST_TGrabCursorMode mo /* Fallback to window bounds. */ if (win->getCursorGrabBounds(bounds) == GHOST_kFailure) { - ((GHOST_Window *)win)->getClientBounds(bounds); + win->getClientBounds(bounds); } bounds.wrapPoint(x_new, y_new, 0, win->getCursorGrabAxis()); diff --git a/intern/ghost/intern/GHOST_WindowWayland.h b/intern/ghost/intern/GHOST_WindowWayland.h index de8eb429992..8fec725e122 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.h +++ b/intern/ghost/intern/GHOST_WindowWayland.h @@ -40,27 +40,8 @@ class GHOST_WindowWayland : public GHOST_Window { uint16_t getDPIHint() override; - GHOST_TSuccess close(); - - GHOST_TSuccess activate(); - - GHOST_TSuccess deactivate(); - - GHOST_TSuccess notify_size(); - - wl_surface *surface() const; - - std::vector<const output_t *> &outputs(); - - output_t *output_find_by_wl(struct wl_output *output); - - bool outputs_changed_update_scale(); + /* Ghost API */ - uint16_t dpi(); - - int scale(); - - protected: GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) override; GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) override; @@ -111,6 +92,28 @@ class GHOST_WindowWayland : public GHOST_Window { void setOpaque() const; #endif + /* WAYLAND utility functions. */ + + GHOST_TSuccess close(); + + GHOST_TSuccess activate(); + + GHOST_TSuccess deactivate(); + + GHOST_TSuccess notify_size(); + + wl_surface *surface() const; + + std::vector<const output_t *> &outputs(); + + output_t *output_find_by_wl(struct wl_output *output); + + bool outputs_changed_update_scale(); + + uint16_t dpi(); + + int scale(); + private: GHOST_SystemWayland *m_system; struct window_t *w; |