Implement <resize><drawContents>

<resize><drawContents>[yes|no] configures whether to let the clients
redraw its window content content while resizing.

When <resize><drawContents> is set to no, a multi-rect is shown to
indicate the geometry of the resized window.
This commit is contained in:
tokyo4j 2024-05-29 11:06:39 +09:00 committed by Johan Malm
parent 25415eb7ab
commit bb1d0b4352
10 changed files with 113 additions and 12 deletions

View file

@ -118,6 +118,7 @@ struct rcxml {
enum tiling_events_mode snap_tiling_events_mode;
enum resize_indicator_mode resize_indicator;
bool resize_draw_contents;
struct {
int popuptime;

13
include/resize-outlines.h Normal file
View file

@ -0,0 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_RESIZE_OUTLINES_H
#define LABWC_RESIZE_OUTLINES_H
#include <wlr/util/box.h>
struct view;
void resize_outlines_update(struct view *view, struct wlr_box new_geo);
void resize_outlines_finish(struct view *view);
bool resize_outlines_enabled(struct view *view);
#endif /* LABWC_RESIZE_OUTLINES_H */

View file

@ -238,6 +238,10 @@ struct view {
struct wlr_scene_rect *background;
struct scaled_font_buffer *text;
} resize_indicator;
struct resize_outlines {
struct wlr_box view_geo;
struct multi_rect *rect;
} resize_outlines;
struct foreign_toplevel {
struct wlr_foreign_toplevel_handle_v1 *handle;