diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-07 06:49:40 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-07 06:49:40 +0100 |
| commit | 37bf3835b0b3ce7f4c80924f40735698f057ef6f (patch) | |
| tree | 5862a10eef97cf3575bfe55b2f29fc5a79ae3270 /src/fl_shortcut.cxx | |
| parent | b663e272e7f39063a5c1bf744038ded0a7566990 (diff) | |
Create class Fl_Unix_Screen_Driver used by X11 and Wayland platforms
Diffstat (limited to 'src/fl_shortcut.cxx')
| -rw-r--r-- | src/fl_shortcut.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index 4a02207d3..d0e95bf38 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -35,6 +35,7 @@ #include <FL/Fl_Button.H> #include <FL/Fl.H> #include "Fl_System_Driver.H" +#include "Fl_Screen_Driver.H" #include <FL/fl_draw.H> #include <stdlib.h> #include <ctype.h> @@ -198,7 +199,7 @@ const char* fl_shortcut_label(unsigned int shortcut, const char **eom) { if (eom) *eom = p; // add key name - return Fl::system_driver()->shortcut_add_key_name(key, p, buf, eom); + return Fl::screen_driver()->shortcut_add_key_name(key, p, buf, eom); } /** @@ -376,7 +377,7 @@ int Fl_Widget::test_shortcut() { \{ */ -const char *Fl_System_Driver::shortcut_add_key_name(unsigned key, char *p, char *buf, const char **eom) +const char *Fl_Screen_Driver::shortcut_add_key_name(unsigned key, char *p, char *buf, const char **eom) { if (key >= FL_F && key <= FL_F_Last) { *p++ = 'F'; @@ -390,7 +391,7 @@ const char *Fl_System_Driver::shortcut_add_key_name(unsigned key, char *p, char int c = (a+b)/2; if (key_table[c].key == key) { if (p > buf) { - strcpy(p,key_table[c].name); + strcpy(p, key_table[c].name); return buf; } else { const char *sp = key_table[c].name; |
