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.
This commit is contained in:
Campbell Barton 2022-06-14 15:07:24 +10:00
parent 97f894881c
commit f001c85772
2 changed files with 24 additions and 21 deletions

View File

@ -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());

View File

@ -40,27 +40,8 @@ class GHOST_WindowWayland : public GHOST_Window {
uint16_t getDPIHint() override;
GHOST_TSuccess close();
/* Ghost API */
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();
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;