mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-21 21:14:18 +02:00
Release 1.3.2
- Fix Issue 9 - Fix Issue 10
This commit is contained in:
parent
83835d51cf
commit
20a81a5204
11 changed files with 70 additions and 33 deletions
29
Bugs.md
29
Bugs.md
|
|
@ -119,3 +119,32 @@ to resize to the appropriate size. Calling `vsplit` on inkscape
|
|||
demonstrates this issue, since it causes adjacent tiles to overlap
|
||||
(contrary to the idea of a tiling compositor).
|
||||
|
||||
### Issue 9
|
||||
|
||||
* github issue number: N/A
|
||||
* Fixed: 1.3.2
|
||||
|
||||
Cagebreak up to and including release 1.3.1 sometimes does not render
|
||||
dropdown menus correctly.
|
||||
|
||||
Steps to reproduce:
|
||||
|
||||
* Start firefox with wayland environment variables
|
||||
* Press `alt` to show dropdown menus
|
||||
* Move cursor over different menu items
|
||||
* Rendering will not work correctly
|
||||
|
||||
### Issue 10
|
||||
|
||||
* github issue number: N/A
|
||||
* Fixed: 1.3.2
|
||||
|
||||
Cagebreak up to and including release 1.3.2 does not render drag icons
|
||||
correctly.
|
||||
|
||||
Steps to reproduce:
|
||||
|
||||
* Start firefox with wayland environment variables
|
||||
* Click on a link and drag it over the screen
|
||||
* Let go of the link
|
||||
* Rendering will not work correctly
|
||||
|
|
|
|||
|
|
@ -178,6 +178,11 @@ ninja -C build
|
|||
|
||||
For every release after 1.0.5, hashes will be provided.
|
||||
|
||||
1.3.2
|
||||
|
||||
* sha 256: 2cefab73b8d5902b30adb0dda1bd292af2ee808d232abcc4b2a2802d522d5232
|
||||
* sha 512: 3789efde2cb6f629c77738dd6c8638646b345d5272868aa9b244b2b19c53e6a0f5911d34744e3a9ff6253c73b2b11f6714f37ae86cc21d6979e0c8539315d659
|
||||
|
||||
1.3.1
|
||||
|
||||
* sha 256: 71be224cd99d20da4f039675ec5c48213dd14ef027b804501fa3241886b2b08b
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
% CAGEBREAK-CONFIG(1) Version 1.3.1 | Cagebreak Manual
|
||||
% CAGEBREAK-CONFIG(1) Version 1.3.2 | Cagebreak Manual
|
||||
|
||||
# NAME
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
% CAGEBREAK(1) Version 1.3.1 | Cagebreak Manual
|
||||
% CAGEBREAK(1) Version 1.3.2 | Cagebreak Manual
|
||||
|
||||
# NAME
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
project('cagebreak', 'c',
|
||||
version: '1.3.1',
|
||||
version: '1.3.2',
|
||||
license: 'MIT',
|
||||
default_options: [
|
||||
'c_std=c11',
|
||||
|
|
|
|||
1
seat.c
1
seat.c
|
|
@ -731,6 +731,7 @@ handle_drag_icon_destroy(struct wl_listener *listener, void *_data) {
|
|||
struct cg_drag_icon *drag_icon =
|
||||
wl_container_of(listener, drag_icon, destroy);
|
||||
|
||||
drag_icon_damage(drag_icon);
|
||||
wl_list_remove(&drag_icon->link);
|
||||
wl_list_remove(&drag_icon->destroy.link);
|
||||
free(drag_icon);
|
||||
|
|
|
|||
BIN
signatures/1.3.1.sig
Normal file
BIN
signatures/1.3.1.sig
Normal file
Binary file not shown.
Binary file not shown.
49
view.c
49
view.c
|
|
@ -46,25 +46,29 @@ view_get_prev_view(struct cg_view *view) {
|
|||
}
|
||||
|
||||
void
|
||||
view_damage_child(struct cg_view_child *child, int x, int y, bool whole);
|
||||
view_damage_child(struct cg_view_child *child, int x, int y, bool whole) {
|
||||
output_damage_surface(child->view->workspace->output, child->wlr_surface, x,
|
||||
y, whole);
|
||||
}
|
||||
|
||||
static void
|
||||
view_child_handle_commit(struct wl_listener *listener, void *_data) {
|
||||
struct cg_view_child *child = wl_container_of(listener, child, commit);
|
||||
int x, y;
|
||||
child->get_coords(child, &x, &y);
|
||||
view_damage_child(child, child->view->ox + x, child->view->oy + y, false);
|
||||
view_damage_child(child, x, y, false);
|
||||
}
|
||||
|
||||
static void
|
||||
subsurface_create(struct cg_view *view, struct wlr_subsurface *wlr_subsurface);
|
||||
subsurface_create(struct cg_view_child *parent, struct cg_view *view,
|
||||
struct wlr_subsurface *wlr_subsurface);
|
||||
|
||||
static void
|
||||
view_child_handle_new_subsurface(struct wl_listener *listener, void *data) {
|
||||
struct cg_view_child *child =
|
||||
wl_container_of(listener, child, new_subsurface);
|
||||
struct wlr_subsurface *wlr_subsurface = data;
|
||||
subsurface_create(child->view, wlr_subsurface);
|
||||
subsurface_create(child, child->view, wlr_subsurface);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -73,19 +77,16 @@ view_child_finish(struct cg_view_child *child) {
|
|||
return;
|
||||
}
|
||||
|
||||
int x, y;
|
||||
child->get_coords(child, &x, &y);
|
||||
view_damage_child(child, child->view->ox + x, child->view->oy + y, true);
|
||||
|
||||
wl_list_remove(&child->link);
|
||||
wl_list_remove(&child->commit.link);
|
||||
wl_list_remove(&child->new_subsurface.link);
|
||||
}
|
||||
|
||||
void
|
||||
view_child_init(struct cg_view_child *child, struct cg_view *view,
|
||||
struct wlr_surface *wlr_surface) {
|
||||
view_child_init(struct cg_view_child *child, struct cg_view_child *parent,
|
||||
struct cg_view *view, struct wlr_surface *wlr_surface) {
|
||||
child->view = view;
|
||||
child->parent = parent;
|
||||
child->wlr_surface = wlr_surface;
|
||||
|
||||
child->commit.notify = view_child_handle_commit;
|
||||
|
|
@ -118,12 +119,16 @@ subsurface_handle_destroy(struct wl_listener *listener, void *_data) {
|
|||
|
||||
static void
|
||||
subsurface_get_coords(struct cg_view_child *child, int *x, int *y) {
|
||||
|
||||
struct wlr_surface *surface = child->wlr_surface;
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
*x = -child->view->ox;
|
||||
*y = -child->view->oy;
|
||||
|
||||
if(!(child->view && child->view->impl)) {
|
||||
if(child->parent && child->parent->get_coords) {
|
||||
int sx, sy;
|
||||
child->parent->get_coords(child->parent, &sx, &sy);
|
||||
*x += sx;
|
||||
*y += sy;
|
||||
} else {
|
||||
while(surface && wlr_surface_is_subsurface(surface)) {
|
||||
struct wlr_subsurface *subsurface =
|
||||
wlr_subsurface_from_wlr_surface(surface);
|
||||
|
|
@ -138,13 +143,15 @@ subsurface_get_coords(struct cg_view_child *child, int *x, int *y) {
|
|||
}
|
||||
|
||||
static void
|
||||
subsurface_create(struct cg_view *view, struct wlr_subsurface *wlr_subsurface) {
|
||||
subsurface_create(struct cg_view_child *parent, struct cg_view *view,
|
||||
struct wlr_subsurface *wlr_subsurface) {
|
||||
struct cg_subsurface *subsurface = calloc(1, sizeof(struct cg_subsurface));
|
||||
if(!subsurface) {
|
||||
return;
|
||||
}
|
||||
|
||||
view_child_init(&subsurface->view_child, view, wlr_subsurface->surface);
|
||||
view_child_init(&subsurface->view_child, parent, view,
|
||||
wlr_subsurface->surface);
|
||||
subsurface->view_child.destroy = subsurface_destroy;
|
||||
subsurface->view_child.get_coords = subsurface_get_coords;
|
||||
subsurface->wlr_subsurface = wlr_subsurface;
|
||||
|
|
@ -157,7 +164,7 @@ static void
|
|||
handle_new_subsurface(struct wl_listener *listener, void *data) {
|
||||
struct cg_view *view = wl_container_of(listener, view, new_subsurface);
|
||||
struct wlr_subsurface *wlr_subsurface = data;
|
||||
subsurface_create(view, wlr_subsurface);
|
||||
subsurface_create(NULL, view, wlr_subsurface);
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
@ -210,12 +217,6 @@ view_damage(struct cg_view *view, bool whole) {
|
|||
view->oy, whole);
|
||||
}
|
||||
|
||||
void
|
||||
view_damage_child(struct cg_view_child *child, int x, int y, bool whole) {
|
||||
output_damage_surface(child->view->workspace->output, child->wlr_surface, x,
|
||||
y, whole);
|
||||
}
|
||||
|
||||
void
|
||||
view_damage_part(struct cg_view *view) {
|
||||
view_damage(view, false);
|
||||
|
|
@ -325,7 +326,7 @@ view_map(struct cg_view *view, struct wlr_surface *surface) {
|
|||
|
||||
struct wlr_subsurface *subsurface;
|
||||
wl_list_for_each(subsurface, &view->wlr_surface->subsurfaces, parent_link) {
|
||||
subsurface_create(view, subsurface);
|
||||
subsurface_create(NULL, view, subsurface);
|
||||
}
|
||||
|
||||
view->new_subsurface.notify = handle_new_subsurface;
|
||||
|
|
|
|||
5
view.h
5
view.h
|
|
@ -52,6 +52,7 @@ struct cg_view_impl {
|
|||
|
||||
struct cg_view_child {
|
||||
struct cg_view *view;
|
||||
struct cg_view_child *parent;
|
||||
struct wlr_surface *wlr_surface;
|
||||
struct wl_list link;
|
||||
|
||||
|
|
@ -110,7 +111,7 @@ view_wlr_surface_at(const struct cg_view *view, double sx, double sy,
|
|||
void
|
||||
view_child_finish(struct cg_view_child *child);
|
||||
void
|
||||
view_child_init(struct cg_view_child *child, struct cg_view *view,
|
||||
struct wlr_surface *wlr_surface);
|
||||
view_child_init(struct cg_view_child *child, struct cg_view_child *parent,
|
||||
struct cg_view *view, struct wlr_surface *wlr_surface);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -128,8 +128,8 @@ xdg_popup_get_coords(struct cg_view_child *child, int *x, int *y) {
|
|||
struct cg_xdg_popup *popup = (struct cg_xdg_popup *)child;
|
||||
struct wlr_xdg_surface *surface = popup->wlr_popup->base;
|
||||
|
||||
int x_offset = -surface->geometry.x;
|
||||
int y_offset = -surface->geometry.y;
|
||||
int x_offset = -surface->geometry.x - child->view->ox;
|
||||
int y_offset = -surface->geometry.y - child->view->oy;
|
||||
|
||||
wlr_xdg_popup_get_toplevel_coords(
|
||||
surface->popup, x_offset + surface->popup->geometry.x,
|
||||
|
|
@ -145,7 +145,7 @@ xdg_popup_create(struct cg_view *view, struct wlr_xdg_popup *wlr_popup) {
|
|||
|
||||
popup->wlr_popup = wlr_popup;
|
||||
popup->view_child.get_coords = xdg_popup_get_coords;
|
||||
view_child_init(&popup->view_child, view, wlr_popup->base->surface);
|
||||
view_child_init(&popup->view_child, NULL, view, wlr_popup->base->surface);
|
||||
popup->view_child.destroy = xdg_popup_destroy;
|
||||
popup->destroy.notify = handle_xdg_popup_destroy;
|
||||
wl_signal_add(&wlr_popup->base->events.destroy, &popup->destroy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue