mirror of
https://github.com/swaywm/sway.git
synced 2026-04-17 06:46:32 -04:00
Fix sway_session_lock_has_surface
Before this commit, if the cursor is at screen center, and the lock is swaylock, the cursor would be at swaylock's subsurface(the indicator). Since it's not the lock surface, `handle_rebase` would refuse to rebase the cursor to there. Thereby the cursor enter event won't be sent to swaylock. This commit fix the issue.
This commit is contained in:
parent
909a2ddb5f
commit
822ce7b515
1 changed files with 2 additions and 1 deletions
|
|
@ -335,8 +335,9 @@ void sway_session_lock_add_output(struct sway_session_lock *lock,
|
||||||
bool sway_session_lock_has_surface(struct sway_session_lock *lock,
|
bool sway_session_lock_has_surface(struct sway_session_lock *lock,
|
||||||
struct wlr_surface *surface) {
|
struct wlr_surface *surface) {
|
||||||
struct sway_session_lock_output *lock_output;
|
struct sway_session_lock_output *lock_output;
|
||||||
|
struct wlr_surface *root_surface = wlr_surface_get_root_surface(surface);
|
||||||
wl_list_for_each(lock_output, &lock->outputs, link) {
|
wl_list_for_each(lock_output, &lock->outputs, link) {
|
||||||
if (lock_output->surface && lock_output->surface->surface == surface) {
|
if (lock_output->surface && lock_output->surface->surface == root_surface) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue