clutter: Simplify stage state management
Making this an event is overly convoluted, accounting that we emit the event, then convert it to a ClutterStage signal, then its only consumer (a11y) sets the active ATK state. Take the event out of the equation, unify activation/deactivation of the stage in MetaStage, and use it from the X11 backend too. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
This commit is contained in:

committed by
Marge Bot

parent
96e320ba5a
commit
4a0c56f928
@ -26,6 +26,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "backends/meta-stage-private.h"
|
||||
#include "backends/x11/cm/meta-backend-x11-cm.h"
|
||||
#include "backends/x11/cm/meta-renderer-x11-cm.h"
|
||||
#include "backends/x11/meta-backend-x11.h"
|
||||
@ -692,21 +693,11 @@ meta_stage_x11_translate_event (MetaStageX11 *stage_x11,
|
||||
break;
|
||||
|
||||
case FocusIn:
|
||||
if (!_clutter_stage_is_activated (stage_cogl->wrapper))
|
||||
{
|
||||
_clutter_stage_update_state (stage_cogl->wrapper,
|
||||
0,
|
||||
CLUTTER_STAGE_STATE_ACTIVATED);
|
||||
}
|
||||
meta_stage_set_active ((MetaStage *) stage_cogl->wrapper, TRUE);
|
||||
break;
|
||||
|
||||
case FocusOut:
|
||||
if (_clutter_stage_is_activated (stage_cogl->wrapper))
|
||||
{
|
||||
_clutter_stage_update_state (stage_cogl->wrapper,
|
||||
CLUTTER_STAGE_STATE_ACTIVATED,
|
||||
0);
|
||||
}
|
||||
meta_stage_set_active ((MetaStage *) stage_cogl->wrapper, FALSE);
|
||||
break;
|
||||
|
||||
case Expose:
|
||||
|
Reference in New Issue
Block a user