summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2021-06-18 18:46:17 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2021-06-18 18:46:17 +0200
commit713d1bfd7c4a538b7bd3625a5f521f5911a9f500 (patch)
tree154054ca49f2801a85186f08ec4b6704b190a3da /src/drivers
parentf94ed7116c2943c105faebb14798e2ac33bb37cd (diff)
Revert parts of and fix other 'constness' changes (#239, #181)
Some of the previous constness changes turned out to be incomplete, others had to be reverted because some other driver methods could not be made 'const' - particularly those calling open_display() to get the requested information.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H2
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx4
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.H2
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
index 4ea00677d..9c20b3b9b 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.H
@@ -85,7 +85,7 @@ public:
virtual void repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp);
virtual int has_timeout(Fl_Timeout_Handler cb, void *argp);
virtual void remove_timeout(Fl_Timeout_Handler cb, void *argp);
- virtual int has_marked_text();
+ virtual int has_marked_text() const;
virtual void reset_marked_text();
virtual void insertion_point_location(int x, int y, int height);
int insertion_point_location(int *px, int *py, int *pheight);
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
index 651da1f1d..1838a73f3 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
@@ -210,8 +210,8 @@ void Fl_Cocoa_Screen_Driver::get_system_colors()
}
-int Fl_Cocoa_Screen_Driver::has_marked_text() {
- return true;
+int Fl_Cocoa_Screen_Driver::has_marked_text() const {
+ return 1;
}
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.H b/src/drivers/X11/Fl_X11_Screen_Driver.H
index c25337e0f..6fb8330f5 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.H
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.H
@@ -92,7 +92,7 @@ public:
virtual int dnd(int unused);
virtual int compose(int &del);
virtual void compose_reset();
- virtual int text_display_can_leak();
+ virtual int text_display_can_leak() const;
virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h, Fl_Window *win, bool may_capture_subwins, bool *did_capture_subwins);
virtual int get_mouse(int &x, int &y);
virtual void enable_im();
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 22aa7e659..1dbd52154 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -701,7 +701,7 @@ void Fl_X11_Screen_Driver::compose_reset()
if (fl_xim_ic) XmbResetIC(fl_xim_ic);
}
-int Fl_X11_Screen_Driver::text_display_can_leak() {
+int Fl_X11_Screen_Driver::text_display_can_leak() const {
#if USE_XFT
return 1;
#else