summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-11-07 06:49:40 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-11-07 06:49:40 +0100
commit37bf3835b0b3ce7f4c80924f40735698f057ef6f (patch)
tree5862a10eef97cf3575bfe55b2f29fc5a79ae3270 /src/Fl_x.cxx
parentb663e272e7f39063a5c1bf744038ded0a7566990 (diff)
Create class Fl_Unix_Screen_Driver used by X11 and Wayland platforms
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 1f1b16ba7..2c2720033 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -40,7 +40,7 @@
# include "flstring.h"
# include "drivers/X11/Fl_X11_Screen_Driver.H"
# include "drivers/X11/Fl_X11_Window_Driver.H"
-# include "drivers/X11/Fl_X11_System_Driver.H"
+# include "drivers/Unix/Fl_Unix_System_Driver.H"
#if FLTK_USE_CAIRO
# include "drivers/Cairo/Fl_Display_Cairo_Graphics_Driver.H"
#else
@@ -129,19 +129,18 @@ static void do_queued_events() {
// This is never called with time_to_wait < 0.0:
// It should return negative on error, 0 if nothing happens before
// timeout, and >0 if any callbacks were done.
-int Fl_X11_System_Driver::poll_or_select_with_delay(double time_to_wait) {
-
+int Fl_X11_Screen_Driver::poll_or_select_with_delay(double time_to_wait) {
// OpenGL and other broken libraries call XEventsQueued
// unnecessarily and thus cause the file descriptor to not be ready,
// so we must check for already-read events:
if (fl_display && XQLength(fl_display)) {do_queued_events(); return 1;}
- return Fl_Unix_System_Driver::poll_or_select_with_delay(time_to_wait);
+ return Fl_Unix_Screen_Driver::poll_or_select_with_delay(time_to_wait);
}
-// just like Fl_X11_System_Driver::poll_or_select_with_delay(0.0) except no callbacks are done:
-int Fl_X11_System_Driver::poll_or_select() {
+// just like Fl_X11_Screen_Driver::poll_or_select_with_delay(0.0) except no callbacks are done:
+int Fl_X11_Screen_Driver::poll_or_select() {
if (XQLength(fl_display)) return 1;
- return Fl_Unix_System_Driver::poll_or_select();
+ return Fl_Unix_Screen_Driver::poll_or_select();
}
// replace \r\n by \n