diff options
| author | Matthias Melcher <github@matthiasm.com> | 2024-02-10 14:55:52 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2024-02-10 14:55:52 +0100 |
| commit | a7bc26e12a43cbf01ec56e90bc6a3f9e3da9d724 (patch) | |
| tree | ebb862bce3ea5f1ed2f1a24b35706639e1f00f07 /fluid | |
| parent | 1ed14867e62811ca4b2f6f968b3376ce0a148182 (diff) | |
FLUID: Fix double reverse logic in FL_COMMAND handling
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Menu_Type.cxx | 4 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index ab8c2cca8..ebc7a4653 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -398,8 +398,8 @@ void Fl_Menu_Item_Type::write_item(Fd_Code_Writer& f) { int s = ((Fl_Button*)o)->shortcut(); f.write_c(", "); if (g_project.use_FL_COMMAND) { - if (s & FL_COMMAND) { f.write_c("FL_COMMAND|"); s &= ~FL_COMMAND; } - if (s & FL_CONTROL) { f.write_c("FL_CONTROL|"); s &= ~FL_CONTROL; } + if (s & FL_CTRL) { f.write_c("FL_CONTROL|"); s &= ~FL_CTRL; } + if (s & FL_META) { f.write_c("FL_COMMAND|"); s &= ~FL_META; } } else { if (s & FL_CTRL) { f.write_c("FL_CTRL|"); s &= ~FL_CTRL; } if (s & FL_META) { f.write_c("FL_META|"); s &= ~FL_META; } diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 2b087f743..ac93aeeff 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -3105,8 +3105,8 @@ void Fl_Widget_Type::write_widget_code(Fd_Code_Writer& f) { int s = shortcut; f.write_c("%s%s->shortcut(", f.indent(), var); if (g_project.use_FL_COMMAND) { - if (s & FL_COMMAND) { f.write_c("FL_COMMAND|"); s &= ~FL_COMMAND; } - if (s & FL_CONTROL) { f.write_c("FL_CONTROL|"); s &= ~FL_CONTROL; } + if (s & FL_CTRL) { f.write_c("FL_CONTROL|"); s &= ~FL_CTRL; } + if (s & FL_META) { f.write_c("FL_COMMAND|"); s &= ~FL_META; } } else { if (s & FL_CTRL) { f.write_c("FL_CTRL|"); s &= ~FL_CTRL; } if (s & FL_META) { f.write_c("FL_META|"); s &= ~FL_META; } |
