mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
workspaces: follow_pointer_mouse doesn't follow hidden containers
This commit is contained in:
parent
8cc2c6fa7a
commit
d8f364a846
3 changed files with 6 additions and 2 deletions
|
@ -85,7 +85,8 @@ bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers
|
||||||
bool pointer_test(swayc_t *view, void *_origin) {
|
bool pointer_test(swayc_t *view, void *_origin) {
|
||||||
const struct wlc_origin *origin = _origin;
|
const struct wlc_origin *origin = _origin;
|
||||||
if (view->type == C_VIEW && origin->x >= view->x && origin->y >= view->y
|
if (view->type == C_VIEW && origin->x >= view->x && origin->y >= view->y
|
||||||
&& origin->x < view->x + view->width && origin->y < view->y + view->height) {
|
&& origin->x < view->x + view->width && origin->y < view->y + view->height
|
||||||
|
&& view->visible) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -29,7 +29,9 @@ struct sway_container {
|
||||||
|
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
int weight;
|
bool visible;
|
||||||
|
|
||||||
|
int weight;
|
||||||
|
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ void set_mask(swayc_t *view, void *data) {
|
||||||
|
|
||||||
if(view->type == C_VIEW) {
|
if(view->type == C_VIEW) {
|
||||||
wlc_view_set_mask(view->handle, *p);
|
wlc_view_set_mask(view->handle, *p);
|
||||||
|
view->visible = (*p == 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue