Skip to content

Commit f6ff339

Browse files
committed
wlroots: adapt to scene fractional position changes
Signed-off-by: Loukas Agorgianitis <[email protected]>
1 parent 4943534 commit f6ff339

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

Diff for: sway/desktop/layer_shell.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static void popup_unconstrain(struct sway_layer_popup *popup) {
346346
return;
347347
}
348348

349-
int lx, ly;
349+
double lx, ly;
350350
wlr_scene_node_coords(&popup->toplevel->scene->tree->node, &lx, &ly);
351351

352352
// the output box expressed in the coordinate system of the toplevel parent

Diff for: sway/desktop/output.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static struct buffer_timer *buffer_timer_get_or_create(struct wlr_scene_buffer *
142142
}
143143

144144
static void send_frame_done_iterator(struct wlr_scene_buffer *buffer,
145-
int x, int y, void *user_data) {
145+
double x, double y, void *user_data) {
146146
struct send_frame_done_data *data = user_data;
147147
struct sway_output *output = data->output;
148148
int view_max_render_time = 0;

Diff for: sway/desktop/transaction.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ void arrange_popups(struct wlr_scene_tree *popups) {
623623
SWAY_SCENE_DESC_POPUP);
624624

625625
if (popup) {
626-
int lx, ly;
626+
double lx, ly;
627627
wlr_scene_node_coords(popup->relative, &lx, &ly);
628628
wlr_scene_node_set_position(node, lx, ly);
629629
}

Diff for: sway/desktop/xdg_shell.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ static void handle_new_popup(struct wl_listener *listener, void *data) {
364364
return;
365365
}
366366

367-
int lx, ly;
367+
double lx, ly;
368368
wlr_scene_node_coords(&popup->view->content_tree->node, &lx, &ly);
369369
wlr_scene_node_set_position(&popup->scene_tree->node, lx, ly);
370370
}

Diff for: sway/input/text_input.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ static void constrain_popup(struct sway_input_popup *popup) {
136136
}
137137

138138
struct wlr_box parent = {0};
139-
wlr_scene_node_coords(&popup->desc.relative->parent->node, &parent.x, &parent.y);
139+
double lx, ly;
140+
wlr_scene_node_coords(&popup->desc.relative->parent->node, &lx, &ly);
141+
parent.x = lx;
142+
parent.y = ly;
140143

141144
struct wlr_box geo = {0};
142145
struct wlr_output *output;

Diff for: sway/tree/view.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ void view_remove_saved_buffer(struct sway_view *view) {
11781178
}
11791179

11801180
static void view_save_buffer_iterator(struct wlr_scene_buffer *buffer,
1181-
int sx, int sy, void *data) {
1181+
double sx, double sy, void *data) {
11821182
struct wlr_scene_tree *tree = data;
11831183

11841184
struct wlr_scene_buffer *sbuf = wlr_scene_buffer_create(tree, NULL);
@@ -1238,7 +1238,7 @@ bool view_can_tear(struct sway_view *view) {
12381238
}
12391239

12401240
static void send_frame_done_iterator(struct wlr_scene_buffer *scene_buffer,
1241-
int x, int y, void *data) {
1241+
double x, double y, void *data) {
12421242
struct timespec *when = data;
12431243
wl_signal_emit_mutable(&scene_buffer->events.frame_done, when);
12441244
}

0 commit comments

Comments
 (0)