mirror of
https://github.com/fltk/fltk.git
synced 2026-05-24 16:36:37 +08:00
Implement and document Fl::add_system_handler() for Wayland
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user