Commit d9835ac2 authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak Committed by Guido Gunther
Browse files

cursor: Define PHOC_SHELL_REVEAL_*_THRESHOLD in layout pixels

This makes it consistent with PHOC_EDGE_SNAP_THRESHOLD and actually makes
more sense.
parent ab4981db
......@@ -101,7 +101,7 @@ static void seat_view_deco_button(struct roots_seat_view *view, double sx,
}
}
static bool roots_handle_shell_reveal(struct wlr_surface *surface, double lx, double ly, double threshold) {
static bool roots_handle_shell_reveal(struct wlr_surface *surface, double lx, double ly, int threshold) {
PhocServer *server = phoc_server_get_default ();
PhocDesktop *desktop = server->desktop;
......@@ -156,10 +156,10 @@ static bool roots_handle_shell_reveal(struct wlr_surface *surface, double lx, do
}
}
if ((top && ly <= output_box->y + threshold * output_box->height) ||
(bottom && ly >= output_box->y + (1.0 - threshold) * output_box->height - 1) ||
(left && lx <= output_box->x + threshold * output_box->width) ||
(right && lx >= output_box->x + (1.0 - threshold) * output_box->width - 1)) {
if ((top && ly <= output_box->y + threshold) ||
(bottom && ly >= output_box->y + output_box->height - 1 - threshold) ||
(left && lx <= output_box->x + threshold) ||
(right && lx >= output_box->x + output_box->width - 1 - threshold)) {
if (output->fullscreen_view) {
output->force_shell_reveal = true;
phoc_output_damage_whole(output);
......
......@@ -4,8 +4,8 @@
#include <wlr/types/wlr_pointer_constraints_v1.h>
#include "seat.h"
#define PHOC_SHELL_REVEAL_TOUCH_THRESHOLD 0.015
#define PHOC_SHELL_REVEAL_POINTER_THRESHOLD 0.0
#define PHOC_SHELL_REVEAL_TOUCH_THRESHOLD 10
#define PHOC_SHELL_REVEAL_POINTER_THRESHOLD 0
#define PHOC_EDGE_SNAP_THRESHOLD 20
enum roots_cursor_mode {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment