Skip to content

Commit

Permalink
Implement and document Fl::add_system_handler() for Wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
ManoloFLTK committed Aug 26, 2024
1 parent 6d04ef2 commit 13f1911
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ static system_handler_link *sys_handlers = 0;
- X11: XEvent
- Windows: MSG
- OS X: NSEvent
- Wayland: not implemented
- Wayland: NULL (FLTK runs the event handler(s) just before calling \e wl_display_dispatch())
\param ha The event handler function to register
\param data User data to include on each call
Expand Down
4 changes: 4 additions & 0 deletions src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,11 @@ static const struct wl_registry_listener registry_listener = {
};


extern int fl_send_system_handlers(void *);


static void wayland_socket_callback(int fd, struct wl_display *display) {
if (fl_send_system_handlers(NULL)) return;
struct pollfd fds = (struct pollfd) { fd, POLLIN, 0 };
do {
if (wl_display_dispatch(display) == -1) {
Expand Down

0 comments on commit 13f1911

Please sign in to comment.