shell: Allow dragged windows to be focused
This commit is contained in:
parent
989ee95858
commit
d4926c3a9e
2 changed files with 18 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ use tracing::{debug, trace};
|
|||
|
||||
use self::target::{KeyboardFocusTarget, WindowGroup};
|
||||
|
||||
use super::{layout::floating::FloatingLayout, SeatExt};
|
||||
use super::{grabs::SeatMoveGrabState, layout::floating::FloatingLayout, SeatExt};
|
||||
|
||||
pub mod target;
|
||||
|
||||
|
|
@ -388,6 +388,20 @@ fn focus_target_is_valid(
|
|||
|
||||
match target {
|
||||
KeyboardFocusTarget::Element(mapped) => {
|
||||
if seat
|
||||
.user_data()
|
||||
.get::<SeatMoveGrabState>()
|
||||
.is_some_and(|state| {
|
||||
state
|
||||
.lock()
|
||||
.unwrap()
|
||||
.as_ref()
|
||||
.is_some_and(|state| state.element() == mapped)
|
||||
})
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
let is_sticky = shell
|
||||
.workspaces
|
||||
.sets
|
||||
|
|
|
|||
|
|
@ -2592,6 +2592,9 @@ impl Shell {
|
|||
.refresh(xdg_activation_state);
|
||||
}
|
||||
|
||||
mapped.set_activate(true);
|
||||
mapped.configure();
|
||||
|
||||
let grab = MoveGrab::new(
|
||||
start_data,
|
||||
mapped,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue