mirror of https://github.com/GNOME/gimp.git
Bug 793777 - CRITICALs on focus change in MWM with stylus.
Focus change events were expecting the current tool control to be inactive, which was the case most of the time. Yet with stylus, the canvas was sometimes receiving GDK_BUTTON_PRESS events before GDK_FOCUS_CHANGE. In particular the canvas was receiving a button press before the focus out, then button release and focus in. Therefore by the time the focus out event happens, the tool control is active, which broke a few calls. Therefore I add a few checks and returns immediately when gimp_tool_control_is_active() return TRUE, especially since we also run gimp_display_shell_update_focus() calls after a button press anyway so the state should already be consistent.
This commit is contained in:
parent
cada28e91e
commit
845eb522b6
|
@ -390,7 +390,8 @@ tool_manager_focus_display_active (Gimp *gimp,
|
|||
|
||||
tool_manager = tool_manager_get (gimp);
|
||||
|
||||
if (tool_manager->active_tool)
|
||||
if (tool_manager->active_tool &&
|
||||
! gimp_tool_control_is_active (tool_manager->active_tool->control))
|
||||
{
|
||||
gimp_tool_set_focus_display (tool_manager->active_tool,
|
||||
display);
|
||||
|
@ -448,7 +449,8 @@ tool_manager_oper_update_active (Gimp *gimp,
|
|||
|
||||
tool_manager = tool_manager_get (gimp);
|
||||
|
||||
if (tool_manager->active_tool)
|
||||
if (tool_manager->active_tool &&
|
||||
! gimp_tool_control_is_active (tool_manager->active_tool->control))
|
||||
{
|
||||
gimp_tool_oper_update (tool_manager->active_tool,
|
||||
coords, state, proximity,
|
||||
|
@ -468,7 +470,8 @@ tool_manager_cursor_update_active (Gimp *gimp,
|
|||
|
||||
tool_manager = tool_manager_get (gimp);
|
||||
|
||||
if (tool_manager->active_tool)
|
||||
if (tool_manager->active_tool &&
|
||||
! gimp_tool_control_is_active (tool_manager->active_tool->control))
|
||||
{
|
||||
gimp_tool_cursor_update (tool_manager->active_tool,
|
||||
coords, state,
|
||||
|
|
Loading…
Reference in New Issue