mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 05:54:11 +01:00
sends hidden views to back, visible view to front
This commit is contained in:
parent
ffb3458322
commit
4077238782
@ -238,8 +238,8 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) {
|
static bool handle_pointer_motion(wlc_handle view, uint32_t time, const struct wlc_origin *origin) {
|
||||||
|
static wlc_handle prev_view = 0;
|
||||||
mouse_origin = *origin;
|
mouse_origin = *origin;
|
||||||
static wlc_handle prev_view = -1;
|
|
||||||
if (config->focus_follows_mouse && prev_view != view) {
|
if (config->focus_follows_mouse && prev_view != view) {
|
||||||
focus_pointer();
|
focus_pointer();
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ void unfocus_all(swayc_t *container) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void focus_view(swayc_t *view) {
|
void focus_view(swayc_t *view) {
|
||||||
sway_log(L_DEBUG, "Setting focus for %p", view);
|
sway_log(L_DEBUG, "Setting focus for %p:%ld", view, view->handle);
|
||||||
swayc_t *c = view;
|
swayc_t *c = view;
|
||||||
//Set focus from root to view
|
//Set focus from root to view
|
||||||
while (c != &root_container) {
|
while (c != &root_container) {
|
||||||
|
@ -82,10 +82,14 @@ bool workspace_by_name(swayc_t *view, void *data) {
|
|||||||
|
|
||||||
void set_mask(swayc_t *view, void *data) {
|
void set_mask(swayc_t *view, void *data) {
|
||||||
uint32_t *p = data;
|
uint32_t *p = 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);
|
||||||
}
|
}
|
||||||
|
if (*p == 2) {
|
||||||
|
wlc_view_bring_to_front(view->handle);
|
||||||
|
} else {
|
||||||
|
wlc_view_send_to_back(view->handle);
|
||||||
|
}
|
||||||
view->visible = (*p == 2);
|
view->visible = (*p == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user