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;
|
float scroll_percent = output->workspace_scroll.percent;
|
||||||
|
|
||||||
int ws_dimen;
|
int ws_dimen;
|
||||||
int *box_coord;
|
int *box_coord = NULL;
|
||||||
switch (output->workspace_scroll.direction) {
|
switch (output->workspace_scroll.direction) {
|
||||||
case SWIPE_GESTURE_DIRECTION_NONE:
|
case SWIPE_GESTURE_DIRECTION_NONE:
|
||||||
return;
|
return;
|
||||||
|
@ -99,6 +99,10 @@ static void adjust_box_to_workspace_offset(struct wlr_box *box,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (box_coord == NULL || ws_dimen == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
*box_coord -= ws_dimen * scroll_percent;
|
*box_coord -= ws_dimen * scroll_percent;
|
||||||
if (!on_focused_workspace) {
|
if (!on_focused_workspace) {
|
||||||
if (scroll_percent > 0) {
|
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;
|
float scroll_percent = output->workspace_scroll.percent;
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
|
|
||||||
int ws_dimen;
|
int ws_dimen = 0;
|
||||||
int *coord;
|
int *coord = NULL;
|
||||||
switch (output->workspace_scroll.direction) {
|
switch (output->workspace_scroll.direction) {
|
||||||
case SWIPE_GESTURE_DIRECTION_NONE:
|
case SWIPE_GESTURE_DIRECTION_NONE:
|
||||||
return;
|
return;
|
||||||
|
@ -132,6 +136,10 @@ static void adjust_damage_to_workspace_bounds(pixman_region32_t *damage,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (coord == NULL || ws_dimen == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
*coord = round(-ws_dimen * scroll_percent);
|
*coord = round(-ws_dimen * scroll_percent);
|
||||||
if (!on_focused_workspace) {
|
if (!on_focused_workspace) {
|
||||||
if (scroll_percent > 0) {
|
if (scroll_percent > 0) {
|
||||||
|
|
Loading…
Reference in a new issue