mirror of
https://github.com/swaywm/sway.git
synced 2024-11-21 23:41:27 +00:00
layer_shell: Arrange popups even if exclusive zone doesn't change
This commit is contained in:
parent
1b5515400d
commit
1dc661af17
|
@ -2,6 +2,7 @@
|
||||||
#define _SWAY_TRANSACTION_H
|
#define _SWAY_TRANSACTION_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <wlr/types/wlr_scene.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transactions enable us to perform atomic layout updates.
|
* Transactions enable us to perform atomic layout updates.
|
||||||
|
@ -58,4 +59,6 @@ bool transaction_notify_view_ready_by_serial(struct sway_view *view,
|
||||||
bool transaction_notify_view_ready_by_geometry(struct sway_view *view,
|
bool transaction_notify_view_ready_by_geometry(struct sway_view *view,
|
||||||
double x, double y, int width, int height);
|
double x, double y, int width, int height);
|
||||||
|
|
||||||
|
void arrange_popups(struct wlr_scene_tree *popups);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -85,6 +85,8 @@ void arrange_layers(struct sway_output *output) {
|
||||||
sway_log(SWAY_DEBUG, "Usable area changed, rearranging output");
|
sway_log(SWAY_DEBUG, "Usable area changed, rearranging output");
|
||||||
output->usable_area = usable_area;
|
output->usable_area = usable_area;
|
||||||
arrange_output(output);
|
arrange_output(output);
|
||||||
|
} else {
|
||||||
|
arrange_popups(root->layers.popup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -606,9 +606,9 @@ static void arrange_output(struct sway_output *output, int width, int height) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void arrange_popup(struct wlr_scene_tree *popup) {
|
void arrange_popups(struct wlr_scene_tree *popups) {
|
||||||
struct wlr_scene_node *node;
|
struct wlr_scene_node *node;
|
||||||
wl_list_for_each(node, &popup->children, link) {
|
wl_list_for_each(node, &popups->children, link) {
|
||||||
struct sway_xdg_popup *popup = scene_descriptor_try_get(node,
|
struct sway_xdg_popup *popup = scene_descriptor_try_get(node,
|
||||||
SWAY_SCENE_DESC_POPUP);
|
SWAY_SCENE_DESC_POPUP);
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ static void arrange_root(struct sway_root *root) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
arrange_popup(root->layers.popup);
|
arrange_popups(root->layers.popup);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue