mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Merge pull request #175 from emersion/xdg-shell-resize
rootston: add xdg shell resize support
This commit is contained in:
commit
40303b7a09
7 changed files with 100 additions and 6 deletions
|
|
@ -25,6 +25,16 @@ void view_destroy(struct roots_view *view) {
|
|||
free(view);
|
||||
}
|
||||
|
||||
void view_get_size(struct roots_view *view, struct wlr_box *box) {
|
||||
if (view->get_size) {
|
||||
view->get_size(view, box);
|
||||
return;
|
||||
}
|
||||
box->x = box->y = 0;
|
||||
box->width = view->wlr_surface->current.width;
|
||||
box->height = view->wlr_surface->current.height;
|
||||
}
|
||||
|
||||
void view_get_input_bounds(struct roots_view *view, struct wlr_box *box) {
|
||||
if (view->get_input_bounds) {
|
||||
view->get_input_bounds(view, box);
|
||||
|
|
@ -41,6 +51,12 @@ void view_activate(struct roots_view *view, bool activate) {
|
|||
}
|
||||
}
|
||||
|
||||
void view_resize(struct roots_view *view, uint32_t width, uint32_t height) {
|
||||
if (view->resize) {
|
||||
view->resize(view, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
struct roots_view *view_at(struct roots_desktop *desktop, int x, int y) {
|
||||
for (size_t i = 0; i < desktop->views->length; ++i) {
|
||||
struct roots_view *view = desktop->views->items[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue