Move recognition of Ctrl= out of Fl::test_shortcut(unsigned)
This commit is contained in:
parent
367826979d
commit
5f2069871d
@ -485,6 +485,9 @@ int Fl_Screen_Driver::scale_handler(int event)
|
|||||||
if (Fl::test_shortcut(FL_COMMAND+'+')) zoom = zoom_in;
|
if (Fl::test_shortcut(FL_COMMAND+'+')) zoom = zoom_in;
|
||||||
else if (Fl::test_shortcut(FL_COMMAND+'-')) zoom = zoom_out;
|
else if (Fl::test_shortcut(FL_COMMAND+'-')) zoom = zoom_out;
|
||||||
else if (Fl::test_shortcut(FL_COMMAND+'0')) zoom = zoom_reset;
|
else if (Fl::test_shortcut(FL_COMMAND+'0')) zoom = zoom_reset;
|
||||||
|
// kludge to recognize shortcut FL_COMMAND+'+' without pressing SHIFT
|
||||||
|
else if ((Fl::event_state()&(FL_META|FL_ALT|FL_CTRL|FL_SHIFT)) == FL_COMMAND &&
|
||||||
|
Fl::event_key() == '=') zoom = zoom_in;
|
||||||
if (zoom != none) {
|
if (zoom != none) {
|
||||||
int i, count;
|
int i, count;
|
||||||
if (Fl::grab()) return 0; // don't rescale when menu windows are on
|
if (Fl::grab()) return 0; // don't rescale when menu windows are on
|
||||||
|
@ -78,10 +78,6 @@ int Fl::test_shortcut(unsigned int shortcut) {
|
|||||||
if ((shift&FL_CTRL) && key >= 0x3f && key <= 0x5F
|
if ((shift&FL_CTRL) && key >= 0x3f && key <= 0x5F
|
||||||
&& firstChar==(key^0x40)) return 1; // firstChar should be within a-z
|
&& firstChar==(key^0x40)) return 1; // firstChar should be within a-z
|
||||||
|
|
||||||
// kludge to recognize shortcut FL_COMMAND+'+' without pressing SHIFT
|
|
||||||
if (shortcut == FL_COMMAND + '+' &&
|
|
||||||
(shift&(FL_META|FL_ALT|FL_CTRL|FL_SHIFT)) == FL_COMMAND &&
|
|
||||||
Fl::event_key() == '=') return 1;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user