Track if a move or resize request is client initiated
This commit is contained in:
parent
3625454420
commit
3c24934f48
7 changed files with 18 additions and 10 deletions
|
|
@ -622,6 +622,7 @@ impl CosmicStack {
|
|||
&state.common.config,
|
||||
&state.common.event_loop_handle,
|
||||
&state.common.xdg_activation_state,
|
||||
false,
|
||||
);
|
||||
if let Some((grab, focus)) = res {
|
||||
if grab.is_touch_grab() {
|
||||
|
|
@ -710,6 +711,7 @@ impl Program for CosmicStackInternal {
|
|||
&state.common.config,
|
||||
&state.common.event_loop_handle,
|
||||
&state.common.xdg_activation_state,
|
||||
false,
|
||||
);
|
||||
if let Some((grab, focus)) = res {
|
||||
if grab.is_touch_grab() {
|
||||
|
|
@ -1290,6 +1292,7 @@ impl PointerTarget<State> for CosmicStack {
|
|||
Focus::ResizeRight => ResizeEdge::RIGHT,
|
||||
Focus::Header => unreachable!(),
|
||||
},
|
||||
false,
|
||||
);
|
||||
if let Some((grab, focus)) = res {
|
||||
if grab.is_touch_grab() {
|
||||
|
|
@ -1356,6 +1359,7 @@ impl PointerTarget<State> for CosmicStack {
|
|||
&state.common.config,
|
||||
&state.common.event_loop_handle,
|
||||
&state.common.xdg_activation_state,
|
||||
false,
|
||||
);
|
||||
if let Some((grab, focus)) = res {
|
||||
if grab.is_touch_grab() {
|
||||
|
|
|
|||
|
|
@ -406,6 +406,7 @@ impl Program for CosmicWindowInternal {
|
|||
&state.common.config,
|
||||
&state.common.event_loop_handle,
|
||||
&state.common.xdg_activation_state,
|
||||
false,
|
||||
);
|
||||
if let Some((grab, focus)) = res {
|
||||
if grab.is_touch_grab() {
|
||||
|
|
@ -718,6 +719,7 @@ impl PointerTarget<State> for CosmicWindow {
|
|||
Focus::ResizeRight => ResizeEdge::RIGHT,
|
||||
Focus::Header => unreachable!(),
|
||||
},
|
||||
false,
|
||||
);
|
||||
|
||||
if let Some((grab, focus)) = res {
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ pub fn window_items(
|
|||
&state.common.config,
|
||||
&state.common.event_loop_handle,
|
||||
&state.common.xdg_activation_state,
|
||||
false,
|
||||
);
|
||||
|
||||
std::mem::drop(shell);
|
||||
|
|
|
|||
|
|
@ -2430,15 +2430,11 @@ impl Shell {
|
|||
config: &Config,
|
||||
evlh: &LoopHandle<'static, State>,
|
||||
xdg_activation_state: &XdgActivationState,
|
||||
client_initiated: bool,
|
||||
) -> Option<(MoveGrab, Focus)> {
|
||||
let serial = serial.into();
|
||||
|
||||
let mut start_data = check_grab_preconditions(
|
||||
&seat,
|
||||
surface,
|
||||
serial,
|
||||
release == ReleaseMode::NoMouseButtons && !move_out_of_stack,
|
||||
)?;
|
||||
let mut start_data = check_grab_preconditions(&seat, surface, serial, client_initiated)?;
|
||||
let mut old_mapped = self.element_for_surface(surface).cloned()?;
|
||||
if old_mapped.is_minimized() {
|
||||
return None;
|
||||
|
|
@ -3072,9 +3068,10 @@ impl Shell {
|
|||
seat: &Seat<State>,
|
||||
serial: impl Into<Option<Serial>>,
|
||||
edges: ResizeEdge,
|
||||
client_initiated: bool,
|
||||
) -> Option<(ResizeGrab, Focus)> {
|
||||
let serial = serial.into();
|
||||
let start_data = check_grab_preconditions(&seat, surface, serial, true)?;
|
||||
let start_data = check_grab_preconditions(&seat, surface, serial, client_initiated)?;
|
||||
let mapped = self.element_for_surface(surface).cloned()?;
|
||||
if mapped.is_fullscreen(true) || mapped.is_maximized(true) {
|
||||
return None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue