[Bf-blender-cvs] [f001c857722] master: Cleanup: don't define wayland window methods as private
Campbell Barton
noreply at git.blender.org
Tue Jun 14 07:09:39 CEST 2022
Commit: f001c857722a8d7ebfc647be54f1a9cb3b2972c4
Author: Campbell Barton
Date: Tue Jun 14 15:07:24 2022 +1000
Branches: master
https://developer.blender.org/rBf001c857722a8d7ebfc647be54f1a9cb3b2972c4
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.
===================================================================
M intern/ghost/intern/GHOST_SystemWayland.cpp
M intern/ghost/intern/GHOST_WindowWayland.h
===================================================================
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;
More information about the Bf-blender-cvs
mailing list