diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-03-13 10:38:28 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-03-13 10:38:28 +0100 |
| commit | eeb9267e6ea1a8481bef36186e36c02189924f3b (patch) | |
| tree | cbcac46d56d4bf4da55c240dd650235991335f30 /src/drivers/Wayland/Fl_Wayland_Window_Driver.H | |
| parent | af4789077f44d0391b80432a8e0fcfbf4865a924 (diff) | |
Wayland: add support for multiple high or low DPI displays
Diffstat (limited to 'src/drivers/Wayland/Fl_Wayland_Window_Driver.H')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.H | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H index 3ae9ed320..1bf85a1c1 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.H @@ -60,7 +60,7 @@ private: static bool in_flush; // useful for progressive window drawing static Fl_Wayland_Plugin *gl_plugin(); Fl_Cursor standard_cursor_; // window's standard custom kind - void delete_cursor_(struct wld_window *); + void delete_cursor_(struct wld_window *, bool keep_rgb = false); struct gl_start_support *gl_start_support_; // for support of gl_start/gl_finish public: inline Fl_Cursor standard_cursor() { return standard_cursor_; }; @@ -116,6 +116,7 @@ public: // --- window cursor stuff int set_cursor(Fl_Cursor) FL_OVERRIDE; int set_cursor(const Fl_RGB_Image*, int, int) FL_OVERRIDE; + int set_cursor_4args(const Fl_RGB_Image*, int, int, bool); void shape(const Fl_Image* img) FL_OVERRIDE; void capture_titlebar_and_borders(Fl_RGB_Image*& top, Fl_RGB_Image*& left, Fl_RGB_Image*& bottom, Fl_RGB_Image*& right) FL_OVERRIDE; @@ -136,14 +137,18 @@ struct wld_window { struct wl_surface *wl_surface; struct fl_wld_buffer *buffer; struct xdg_surface *xdg_surface; - union { + enum Fl_Wayland_Window_Driver::kind kind; + union { // for each value of kind struct libdecor_frame *frame; struct wl_subsurface *subsurface; struct xdg_popup *xdg_popup; struct xdg_toplevel *xdg_toplevel; }; - struct wl_cursor *custom_cursor; // non-null when using custom cursor - enum Fl_Wayland_Window_Driver::kind kind; + struct custom_cursor { + struct wl_cursor *wl_cursor; + const Fl_RGB_Image *rgb; + int hotx, hoty; + } *custom_cursor; // non-null when using custom cursor int configured_width; int configured_height; int floating_width; |
