mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
ssd: revert last commit
It was just not a good implementation; we need to consider xdg-shell views as well as xwayland ones. Issue #207
This commit is contained in:
parent
35e24a67ec
commit
92b64e9581
1 changed files with 0 additions and 28 deletions
28
src/ssd.c
28
src/ssd.c
|
|
@ -248,37 +248,9 @@ ssd_visible_box(struct view *view, enum ssd_part_type type)
|
||||||
return box;
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
|
||||||
cursor_in_usable_area(struct server *server, double lx, double ly)
|
|
||||||
{
|
|
||||||
struct output *output;
|
|
||||||
|
|
||||||
struct wlr_output_layout *output_layout = server->output_layout;
|
|
||||||
wl_list_for_each(output, &server->outputs, link) {
|
|
||||||
double ox = 0, oy = 0;
|
|
||||||
wlr_output_layout_output_coords(output_layout,
|
|
||||||
output->wlr_output, &ox, &oy);
|
|
||||||
if (wlr_box_contains_point(&output->usable_area,
|
|
||||||
lx + ox, ly + oy)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ssd_part_type
|
enum ssd_part_type
|
||||||
ssd_at(struct view *view, double lx, double ly)
|
ssd_at(struct view *view, double lx, double ly)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* Do not render resize cursors over exclusive layer-shell clients
|
|
||||||
* such as panels, even if the invisible region of a view's server-
|
|
||||||
* side decoration extends over that layer-shell client.
|
|
||||||
*/
|
|
||||||
bool in_usable_area = cursor_in_usable_area(view->server, lx, ly);
|
|
||||||
if (!in_usable_area) {
|
|
||||||
return LAB_SSD_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ssd_part_type type;
|
enum ssd_part_type type;
|
||||||
for (type = 0; type < LAB_SSD_END_MARKER; ++type) {
|
for (type = 0; type < LAB_SSD_END_MARKER; ++type) {
|
||||||
struct wlr_box box = ssd_box(view, type);
|
struct wlr_box box = ssd_box(view, type);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue