mirror of
https://github.com/labwc/labwc.git
synced 2026-02-11 04:27:51 -05:00
Add window resize indicator
This commit is contained in:
parent
c8321e3264
commit
58b33fb0c9
12 changed files with 296 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include "common/buf.h"
|
||||
#include "common/font.h"
|
||||
#include "config/libinput.h"
|
||||
#include "resize_indicator.h"
|
||||
#include "theme.h"
|
||||
|
||||
enum window_switcher_field_content {
|
||||
|
|
@ -78,6 +79,8 @@ struct rcxml {
|
|||
int snap_edge_range;
|
||||
bool snap_top_maximize;
|
||||
|
||||
enum resize_indicator_mode resize_indicator;
|
||||
|
||||
struct {
|
||||
int popuptime;
|
||||
int min_nr_workspaces;
|
||||
|
|
|
|||
19
include/resize_indicator.h
Normal file
19
include/resize_indicator.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_RESIZE_INDICATOR_H
|
||||
#define LABWC_RESIZE_INDICATOR_H
|
||||
|
||||
struct server;
|
||||
struct view;
|
||||
|
||||
enum resize_indicator_mode {
|
||||
LAB_RESIZE_INDICATOR_NEVER = 0,
|
||||
LAB_RESIZE_INDICATOR_ALWAYS,
|
||||
LAB_RESIZE_INDICATOR_NON_PIXEL
|
||||
};
|
||||
|
||||
void resize_indicator_reconfigure(struct server *server);
|
||||
void resize_indicator_show(struct view *view);
|
||||
void resize_indicator_update(struct view *view);
|
||||
void resize_indicator_hide(struct view *view);
|
||||
|
||||
#endif /* LABWC_RESIZE_INDICATOR_H */
|
||||
|
|
@ -128,6 +128,13 @@ struct view {
|
|||
struct wl_event_source *pending_configure_timeout;
|
||||
|
||||
struct ssd *ssd;
|
||||
struct resize_indicator {
|
||||
int width, height;
|
||||
struct wlr_scene_tree *tree;
|
||||
struct wlr_scene_rect *border;
|
||||
struct wlr_scene_rect *background;
|
||||
struct scaled_font_buffer *text;
|
||||
} resize_indicator;
|
||||
|
||||
struct foreign_toplevel {
|
||||
struct wlr_foreign_toplevel_handle_v1 *handle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue