mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-27 06:35:16 +00:00
Fix focus movement in ui::Entry widget on Mac OS X platform
This commit is contained in:
parent
a7c752116b
commit
c37958a7f3
@ -279,6 +279,9 @@ bool Entry::onProcessMessage(Message* msg)
|
|||||||
case kKeyV: cmd = EntryCmd::Paste; break;
|
case kKeyV: cmd = EntryCmd::Paste; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (getManager()->isFocusMovementKey(msg)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
else if (keymsg->unicodeChar() >= 32) {
|
else if (keymsg->unicodeChar() >= 32) {
|
||||||
// Ctrl and Alt must be unpressed to insert a character
|
// Ctrl and Alt must be unpressed to insert a character
|
||||||
// in the text-field.
|
// in the text-field.
|
||||||
|
@ -1029,6 +1029,20 @@ void Manager::removeMessageFilterFor(Widget* widget)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Manager::isFocusMovementKey(Message* msg)
|
||||||
|
{
|
||||||
|
switch (static_cast<KeyMessage*>(msg)->scancode()) {
|
||||||
|
|
||||||
|
case kKeyTab:
|
||||||
|
case kKeyLeft:
|
||||||
|
case kKeyRight:
|
||||||
|
case kKeyUp:
|
||||||
|
case kKeyDown:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* configures the window for begin the loop */
|
/* configures the window for begin the loop */
|
||||||
void Manager::_openWindow(Window* window)
|
void Manager::_openWindow(Window* window)
|
||||||
{
|
{
|
||||||
|
@ -24,8 +24,7 @@ namespace ui {
|
|||||||
class Timer;
|
class Timer;
|
||||||
class Window;
|
class Window;
|
||||||
|
|
||||||
class Manager : public Widget
|
class Manager : public Widget {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
static Manager* getDefault() {
|
static Manager* getDefault() {
|
||||||
return m_defaultManager;
|
return m_defaultManager;
|
||||||
@ -79,6 +78,8 @@ namespace ui {
|
|||||||
|
|
||||||
LayoutIO* getLayoutIO();
|
LayoutIO* getLayoutIO();
|
||||||
|
|
||||||
|
bool isFocusMovementKey(Message* msg);
|
||||||
|
|
||||||
void _openWindow(Window* window);
|
void _openWindow(Window* window);
|
||||||
void _closeWindow(Window* window, bool redraw_background);
|
void _closeWindow(Window* window, bool redraw_background);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user