summaryrefslogtreecommitdiff
path: root/src/Fl_get_key_mac.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_get_key_mac.cxx
parentb663e272e7f39063a5c1bf744038ded0a7566990 (diff)
Create class Fl_Unix_Screen_Driver used by X11 and Wayland platforms
Diffstat (limited to 'src/Fl_get_key_mac.cxx')
-rw-r--r--src/Fl_get_key_mac.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_get_key_mac.cxx b/src/Fl_get_key_mac.cxx
index 93f8e9210..c950d439e 100644
--- a/src/Fl_get_key_mac.cxx
+++ b/src/Fl_get_key_mac.cxx
@@ -21,6 +21,7 @@
#include <FL/Fl.H>
#include <FL/platform.H>
#include "drivers/Darwin/Fl_Darwin_System_Driver.H"
+#include "drivers/Cocoa/Fl_Cocoa_Screen_Driver.H"
// The list of Mac OS virtual keycodes appears with OS 10.5 in
// ...../Carbon.framework/Frameworks/HIToolbox.framework/Headers/Events.h
@@ -235,12 +236,12 @@ static int fltk2mac(int fltk) {
}
//: returns true, if that key was pressed during the last event
-int Fl_Darwin_System_Driver::event_key(int k) {
+int Fl_Cocoa_Screen_Driver::event_key(int k) {
return get_key(k);
}
//: returns true, if that key is pressed right now
-int Fl_Darwin_System_Driver::get_key(int k) {
+int Fl_Cocoa_Screen_Driver::get_key(int k) {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
if (&CGEventSourceKeyState != NULL) {
return (int)CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState, fltk2mac(k) );