mirror of
https://github.com/swaywm/sway.git
synced 2026-04-15 08:21:37 -04:00
wlroots: adapt to scene fractional position changes
Signed-off-by: Loukas Agorgianitis <loukas@agorgianitis.com>
This commit is contained in:
parent
40aabb80c6
commit
618cc9988a
6 changed files with 10 additions and 7 deletions
|
|
@ -334,7 +334,7 @@ static void popup_unconstrain(struct sway_layer_popup *popup) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lx, ly;
|
double lx, ly;
|
||||||
wlr_scene_node_coords(&popup->toplevel->scene->tree->node, &lx, &ly);
|
wlr_scene_node_coords(&popup->toplevel->scene->tree->node, &lx, &ly);
|
||||||
|
|
||||||
// the output box expressed in the coordinate system of the toplevel parent
|
// the output box expressed in the coordinate system of the toplevel parent
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ static struct buffer_timer *buffer_timer_get_or_create(struct wlr_scene_surface
|
||||||
}
|
}
|
||||||
|
|
||||||
static void send_frame_done_iterator(struct wlr_scene_buffer *buffer,
|
static void send_frame_done_iterator(struct wlr_scene_buffer *buffer,
|
||||||
int x, int y, void *user_data) {
|
double x, double y, void *user_data) {
|
||||||
struct send_frame_done_data *data = user_data;
|
struct send_frame_done_data *data = user_data;
|
||||||
struct sway_output *output = data->output;
|
struct sway_output *output = data->output;
|
||||||
int view_max_render_time = 0;
|
int view_max_render_time = 0;
|
||||||
|
|
|
||||||
|
|
@ -627,7 +627,7 @@ void arrange_popups(struct wlr_scene_tree *popups) {
|
||||||
SWAY_SCENE_DESC_POPUP);
|
SWAY_SCENE_DESC_POPUP);
|
||||||
|
|
||||||
if (popup) {
|
if (popup) {
|
||||||
int lx, ly;
|
double lx, ly;
|
||||||
wlr_scene_node_coords(popup->relative, &lx, &ly);
|
wlr_scene_node_coords(popup->relative, &lx, &ly);
|
||||||
wlr_scene_node_set_position(node, lx, ly);
|
wlr_scene_node_set_position(node, lx, ly);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ static void handle_new_popup(struct wl_listener *listener, void *data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lx, ly;
|
double lx, ly;
|
||||||
wlr_scene_node_coords(&popup->view->content_tree->node, &lx, &ly);
|
wlr_scene_node_coords(&popup->view->content_tree->node, &lx, &ly);
|
||||||
wlr_scene_node_set_position(&popup->scene_tree->node, lx, ly);
|
wlr_scene_node_set_position(&popup->scene_tree->node, lx, ly);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,10 @@ static void constrain_popup(struct sway_input_popup *popup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_box parent = {0};
|
struct wlr_box parent = {0};
|
||||||
wlr_scene_node_coords(&popup->desc.relative->parent->node, &parent.x, &parent.y);
|
double lx, ly;
|
||||||
|
wlr_scene_node_coords(&popup->desc.relative->parent->node, &lx, &ly);
|
||||||
|
parent.x = lx;
|
||||||
|
parent.y = ly;
|
||||||
|
|
||||||
struct wlr_box geo = {0};
|
struct wlr_box geo = {0};
|
||||||
struct wlr_output *output;
|
struct wlr_output *output;
|
||||||
|
|
|
||||||
|
|
@ -1196,7 +1196,7 @@ void view_remove_saved_buffer(struct sway_view *view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void view_save_buffer_iterator(struct wlr_scene_buffer *buffer,
|
static void view_save_buffer_iterator(struct wlr_scene_buffer *buffer,
|
||||||
int sx, int sy, void *data) {
|
double sx, double sy, void *data) {
|
||||||
struct wlr_scene_tree *tree = data;
|
struct wlr_scene_tree *tree = data;
|
||||||
|
|
||||||
struct wlr_scene_buffer *sbuf = wlr_scene_buffer_create(tree, NULL);
|
struct wlr_scene_buffer *sbuf = wlr_scene_buffer_create(tree, NULL);
|
||||||
|
|
@ -1260,7 +1260,7 @@ bool view_can_tear(struct sway_view *view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void send_frame_done_iterator(struct wlr_scene_buffer *scene_buffer,
|
static void send_frame_done_iterator(struct wlr_scene_buffer *scene_buffer,
|
||||||
int x, int y, void *data) {
|
double x, double y, void *data) {
|
||||||
struct timespec *when = data;
|
struct timespec *when = data;
|
||||||
struct wlr_scene_surface *scene_surface = wlr_scene_surface_try_from_buffer(scene_buffer);
|
struct wlr_scene_surface *scene_surface = wlr_scene_surface_try_from_buffer(scene_buffer);
|
||||||
if (scene_surface == NULL) {
|
if (scene_surface == NULL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue