Skip to content
  • Jonas Dreßler's avatar
    stage: Mark stage as active on wayland when it has key-focus · cdf4fda9
    Jonas Dreßler authored
    The "activate" and "deactivate" signals on ClutterStage are used by
    Cally to track the key-focus when the user is interacting with shell UI.
    key-focus only gets tracked while the stage is activated.
    
    Wayland has no concept of the stage receiving focus or not, so right now
    the activation state is bound to whether there's a focus_window in
    meta_display_sync_wayland_input_focus(). Since display->focus_window is
    set pretty much all the time, this effectively binds activation state to
    whether the stage holds a grab or not. This is almost good enough, but
    it misses cases where key-focus is on the stage without a grab, for
    example when keyboard-navigating the panel after using Ctrl+Alt+Tab.
    
    It seems to make more sense to bind the activation state to whether
    key-focus is set to an actor or to NULL, so let's do that instead.
    cdf4fda9