Skip to content

Commit

Permalink
Fixed regular views rendering behind fullscreen ones + code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider committed Jan 24, 2024
1 parent 0a619a0 commit 83e0872
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 71 deletions.
2 changes: 2 additions & 0 deletions include/sway/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ void handle_output_manager_test(struct wl_listener *listener, void *data);
void handle_output_power_manager_set_mode(struct wl_listener *listener,
void *data);

struct workspace_scroll workspace_scroll_get_default();

void workspace_scroll_begin(struct sway_seat *seat,
enum swipe_gesture_direction direction);

Expand Down
18 changes: 9 additions & 9 deletions sway/desktop/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@
#define PREV_WS_LIMIT -1.0f
#define NEXT_WS_LIMIT 1.0f

static struct workspace_scroll workspace_scroll_get_default() {
return (struct workspace_scroll) {
.percent = 0,
.avg_velocity = 0,
.num_updates = 0,
.direction = SWIPE_GESTURE_DIRECTION_NONE,
};
}

struct sway_output *output_by_name_or_id(const char *name_or_id) {
for (int i = 0; i < root->outputs->length; ++i) {
struct sway_output *output = root->outputs->items[i];
Expand Down Expand Up @@ -1126,6 +1117,15 @@ static double ease_out_cubic (double t) {
return pow(p, 3) + 1;
}

struct workspace_scroll workspace_scroll_get_default() {
return (struct workspace_scroll) {
.percent = 0,
.avg_velocity = 0,
.num_updates = 0,
.direction = SWIPE_GESTURE_DIRECTION_NONE,
};
}

void workspace_scroll_begin(struct sway_seat *seat,
enum swipe_gesture_direction direction) {
struct sway_workspace *focused_ws = seat_get_focused_workspace(seat);
Expand Down
Loading

0 comments on commit 83e0872

Please sign in to comment.