Fixed compilation issues on Nix
This commit is contained in:
parent
60ecc42e42
commit
5ace6bb7bd
|
@ -85,7 +85,7 @@ static void adjust_box_to_workspace_offset(struct wlr_box *box,
|
|||
float scroll_percent = output->workspace_scroll.percent;
|
||||
|
||||
int ws_dimen;
|
||||
int *box_coord;
|
||||
int *box_coord = NULL;
|
||||
switch (output->workspace_scroll.direction) {
|
||||
case SWIPE_GESTURE_DIRECTION_NONE:
|
||||
return;
|
||||
|
@ -99,6 +99,10 @@ static void adjust_box_to_workspace_offset(struct wlr_box *box,
|
|||
break;
|
||||
}
|
||||
|
||||
if (box_coord == NULL || ws_dimen == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
*box_coord -= ws_dimen * scroll_percent;
|
||||
if (!on_focused_workspace) {
|
||||
if (scroll_percent > 0) {
|
||||
|
@ -117,8 +121,8 @@ static void adjust_damage_to_workspace_bounds(pixman_region32_t *damage,
|
|||
float scroll_percent = output->workspace_scroll.percent;
|
||||
int x = 0, y = 0;
|
||||
|
||||
int ws_dimen;
|
||||
int *coord;
|
||||
int ws_dimen = 0;
|
||||
int *coord = NULL;
|
||||
switch (output->workspace_scroll.direction) {
|
||||
case SWIPE_GESTURE_DIRECTION_NONE:
|
||||
return;
|
||||
|
@ -132,6 +136,10 @@ static void adjust_damage_to_workspace_bounds(pixman_region32_t *damage,
|
|||
break;
|
||||
}
|
||||
|
||||
if (coord == NULL || ws_dimen == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
*coord = round(-ws_dimen * scroll_percent);
|
||||
if (!on_focused_workspace) {
|
||||
if (scroll_percent > 0) {
|
||||
|
|
Loading…
Reference in a new issue