Wayland: add support of Fl_Window::default_cursor(Fl_Cursor)
This commit is contained in:
parent
b5793feb51
commit
9ff67f013e
@ -112,6 +112,7 @@ public:
|
||||
char show_iconic() { return Fl_Window::show_iconic_; }
|
||||
void show_iconic(char c) { Fl_Window::show_iconic_ = c; }
|
||||
void flx(Fl_X *x) { pWindow->flx_ = x; }
|
||||
Fl_Cursor cursor_default() { return pWindow->cursor_default; }
|
||||
/** for an Fl_Overlay_Window, returns the value of its overlay_ member variable */
|
||||
Fl_Window *overlay() {
|
||||
return pWindow->as_overlay_window() ? pWindow->as_overlay_window()->overlay_ : NULL;
|
||||
|
||||
@ -434,12 +434,13 @@ static void cursor_surface_enter(void *data,
|
||||
//fprintf(stderr, "cursor_surface_enter: wl_output_get_user_data(%p)=%p\n", wl_output, pointer_output->output);
|
||||
wl_list_insert(&seat->pointer_outputs, &pointer_output->link);
|
||||
try_update_cursor(seat);
|
||||
// maintain custom window cursor
|
||||
// maintain custom or standard window cursor
|
||||
Fl_Window *win = Fl::first_window();
|
||||
if (win) {
|
||||
Fl_Wayland_Window_Driver *driver = Fl_Wayland_Window_Driver::driver(win);
|
||||
struct wl_cursor *cursor = driver->cursor();
|
||||
if (cursor) do_set_cursor(seat, cursor);
|
||||
else driver->set_cursor(driver->cursor_default());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user