Fix keyboard management, and windows cannot have focus anymore on click.
[GB.GTK] * BUG: Fix keyboard event management for command keys like DEL that have a text associated with. * BUG: Windows cannot have focus anymore on click. [GB.GTK3] * BUG: Fix keyboard event management for command keys like DEL that have a text associated with. * BUG: Windows cannot have focus anymore on click.
This commit is contained in:
parent
42005272a9
commit
dbded52066
3 changed files with 22 additions and 2 deletions
|
@ -1290,6 +1290,8 @@ bool gControl::canFocusOnClick() const
|
|||
{
|
||||
/*if (_proxy)
|
||||
return _proxy->canFocusOnClick();*/
|
||||
if (isWindow())
|
||||
return false;
|
||||
if (!GTK_IS_BUTTON(widget))
|
||||
return true;
|
||||
return gt_get_focus_on_click(widget);
|
||||
|
|
|
@ -238,7 +238,7 @@ bool gKey::mustIgnoreEvent(GdkEventKey *event)
|
|||
if (!_im_has_input_method)
|
||||
return false;
|
||||
else
|
||||
return (event->type == GDK_KEY_PRESS) && (event->keyval == 0 || !event->string || (uchar)*event->string >= 32);
|
||||
return (event->type == GDK_KEY_PRESS) && (event->keyval == 0 || !event->string || ((uchar)*event->string >= 32 && ((event->keyval & 0xFF00) != 0xFF00)));
|
||||
}
|
||||
|
||||
void gcb_im_commit(GtkIMContext *context, const char *str, gControl *control)
|
||||
|
|
|
@ -902,7 +902,25 @@ void gMainWindow::setVisible(bool vl)
|
|||
focus->setFocus();
|
||||
focus = NULL;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
gControl *ctrl = this;
|
||||
|
||||
for(;;)
|
||||
{
|
||||
ctrl = ctrl->nextFocus();
|
||||
|
||||
if (ctrl->isReallyVisible() && ctrl->isEnabled() && ctrl->canFocus())
|
||||
{
|
||||
ctrl->setFocus();
|
||||
break;
|
||||
}
|
||||
|
||||
if (ctrl == this)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isSkipTaskBar())
|
||||
_activate = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue