mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Merge branch 'master' of github.com:johanmalm/labwc into dehardcode-window-cycle-key
This commit is contained in:
commit
431da3ed0e
11 changed files with 111 additions and 85 deletions
22
README.md
22
README.md
|
|
@ -6,7 +6,8 @@
|
||||||
- [4. Configure](#4-configure)
|
- [4. Configure](#4-configure)
|
||||||
- [5. Run](#5-run)
|
- [5. Run](#5-run)
|
||||||
- [6. Integrate](#6-integrate)
|
- [6. Integrate](#6-integrate)
|
||||||
- [7. Accept](#7-acceptance-criteria)
|
- [7. Roadmap](#7-roadmap)
|
||||||
|
- [8. Contribute](#7-contribute)
|
||||||
|
|
||||||
## 1. What is this?
|
## 1. What is this?
|
||||||
|
|
||||||
|
|
@ -113,24 +114,22 @@ If you have not created an rc.xml config file, default binds will be:
|
||||||
|
|
||||||
Suggested apps to use with labwc:
|
Suggested apps to use with labwc:
|
||||||
|
|
||||||
- Screen-shooter: [grim]
|
- Screen shooter: [grim]
|
||||||
- Screen-recorder: [wf-recorder]
|
- Screen recorder: [wf-recorder]
|
||||||
- Background image: [swaybg]
|
- Background image: [swaybg]
|
||||||
- Panel: [waybar]
|
- Panel: [waybar]
|
||||||
- Launchers: [bemenu], [fuzzel], [wofi]
|
- Launchers: [bemenu], [fuzzel], [wofi]
|
||||||
- Output managers: [kanshi], [wlr-randr]
|
- Output managers: [kanshi], [wlr-randr]
|
||||||
|
- Screen locker: [swaylock]
|
||||||
|
|
||||||
## 7. Acceptance Criteria
|
## 7. Roadmap
|
||||||
|
|
||||||
A lot of emphasis is put on code simplicy when considering features.
|
A lot of emphasis is put on code simplicy when considering features.
|
||||||
|
|
||||||
The main development effort if focused on producing a solid foundation for a
|
The main development effort if focused on producing a solid foundation for a
|
||||||
stacking compositor rather than adding configuration and theming options.
|
stacking compositor rather than adding configuration and theming options.
|
||||||
|
|
||||||
In order to define what 'small feature set' means, refer to the lists of
|
See [acceptance criteria] for details.
|
||||||
[complete] and [outstanding] items.
|
|
||||||
|
|
||||||
For more details, see the full table of [acceptance criteria].
|
|
||||||
|
|
||||||
High-level summary of items which are not inteded to be implemented:
|
High-level summary of items which are not inteded to be implemented:
|
||||||
|
|
||||||
|
|
@ -140,6 +139,10 @@ High-level summary of items which are not inteded to be implemented:
|
||||||
- Any theme option not required to reasonably render common themes (it's amazing
|
- Any theme option not required to reasonably render common themes (it's amazing
|
||||||
how few options are actually required).
|
how few options are actually required).
|
||||||
|
|
||||||
|
## 8. Contribute
|
||||||
|
|
||||||
|
Let's try to stick to this [coding style]
|
||||||
|
|
||||||
[openbox-3.4]: https://github.com/danakj/openbox
|
[openbox-3.4]: https://github.com/danakj/openbox
|
||||||
|
|
||||||
[rc.xml]: docs/rc.xml
|
[rc.xml]: docs/rc.xml
|
||||||
|
|
@ -168,6 +171,7 @@ High-level summary of items which are not inteded to be implemented:
|
||||||
[wofi]: https://hg.sr.ht/~scoopta/wofi
|
[wofi]: https://hg.sr.ht/~scoopta/wofi
|
||||||
[kanshi]: https://github.com/emersion/kanshi.git
|
[kanshi]: https://github.com/emersion/kanshi.git
|
||||||
[wlr-randr]: https://github.com/emersion/wlr-randr.git
|
[wlr-randr]: https://github.com/emersion/wlr-randr.git
|
||||||
|
[swaylock]: https://github.com/swaywm/swaylock
|
||||||
|
|
||||||
[acceptance criteria]: https://github.com/johanmalm/labwc/wiki/Acceptance-criteria
|
[acceptance criteria]: https://github.com/johanmalm/labwc/wiki/Acceptance-criteria
|
||||||
[complete]: https://github.com/johanmalm/labwc/wiki/Minimum-viable-product-complete-items
|
[complete]: https://github.com/johanmalm/labwc/wiki/Minimum-viable-product-complete-items
|
||||||
|
|
@ -175,3 +179,5 @@ High-level summary of items which are not inteded to be implemented:
|
||||||
|
|
||||||
[Video (1:10)]: https://youtu.be/AU_M3n_FS-E
|
[Video (1:10)]: https://youtu.be/AU_M3n_FS-E
|
||||||
[Video (3:42)]: https://youtu.be/rE1bQjSVJzg
|
[Video (3:42)]: https://youtu.be/rE1bQjSVJzg
|
||||||
|
|
||||||
|
[coding style]: https://git.sr.ht/~sircmpwn/cstyle
|
||||||
|
|
|
||||||
|
|
@ -382,11 +382,11 @@ void action(struct server *server, const char *action, const char *command);
|
||||||
/* update onscreen display 'alt-tab' texture */
|
/* update onscreen display 'alt-tab' texture */
|
||||||
void osd_update(struct server *server);
|
void osd_update(struct server *server);
|
||||||
|
|
||||||
/* wlroots "input inhibitor" extension (required for swaylock) blocks
|
/*
|
||||||
|
* wlroots "input inhibitor" extension (required for swaylock) blocks
|
||||||
* any client other than the requesting client from receiving events
|
* any client other than the requesting client from receiving events
|
||||||
*/
|
*/
|
||||||
bool input_inhibit_blocks_surface(struct seat *seat,
|
bool input_inhibit_blocks_surface(struct seat *seat,
|
||||||
struct wl_resource *resource);
|
struct wl_resource *resource);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __LABWC_H */
|
#endif /* __LABWC_H */
|
||||||
|
|
|
||||||
10
src/cursor.c
10
src/cursor.c
|
|
@ -105,8 +105,8 @@ set_cursor(struct server *server, const char *cursor_name)
|
||||||
server->seat.xcursor_manager, cursor_name, server->seat.cursor);
|
server->seat.xcursor_manager, cursor_name, server->seat.cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool input_inhibit_blocks_surface(struct seat *seat,
|
bool
|
||||||
struct wl_resource *resource)
|
input_inhibit_blocks_surface(struct seat *seat, struct wl_resource *resource)
|
||||||
{
|
{
|
||||||
struct wl_client *inhibiting_client =
|
struct wl_client *inhibiting_client =
|
||||||
seat->active_client_while_inhibited;
|
seat->active_client_while_inhibited;
|
||||||
|
|
@ -419,9 +419,11 @@ cursor_init(struct seat *seat)
|
||||||
wl_signal_add(&seat->cursor->events.frame, &seat->cursor_frame);
|
wl_signal_add(&seat->cursor->events.frame, &seat->cursor_frame);
|
||||||
|
|
||||||
seat->request_cursor.notify = request_cursor_notify;
|
seat->request_cursor.notify = request_cursor_notify;
|
||||||
wl_signal_add(&seat->seat->events.request_set_cursor, &seat->request_cursor);
|
wl_signal_add(&seat->seat->events.request_set_cursor,
|
||||||
|
&seat->request_cursor);
|
||||||
seat->request_set_selection.notify = request_set_selection_notify;
|
seat->request_set_selection.notify = request_set_selection_notify;
|
||||||
wl_signal_add(&seat->seat->events.request_set_selection, &seat->request_set_selection);
|
wl_signal_add(&seat->seat->events.request_set_selection,
|
||||||
|
&seat->request_set_selection);
|
||||||
|
|
||||||
seat->request_set_primary_selection.notify =
|
seat->request_set_primary_selection.notify =
|
||||||
request_set_primary_selection_notify;
|
request_set_primary_selection_notify;
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,9 @@ desktop_set_focus_view_only(struct seat *seat, struct view *view)
|
||||||
if (!view || view->minimized || !view->mapped) {
|
if (!view || view->minimized || !view->mapped) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(input_inhibit_blocks_surface(seat, view->surface->resource))
|
if (input_inhibit_blocks_surface(seat, view->surface->resource)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct wlr_surface *prev_surface;
|
struct wlr_surface *prev_surface;
|
||||||
prev_surface = seat->seat->keyboard_state.focused_surface;
|
prev_surface = seat->seat->keyboard_state.focused_surface;
|
||||||
|
|
@ -99,8 +100,9 @@ desktop_focus_view(struct seat *seat, struct view *view)
|
||||||
seat_focus_surface(seat, NULL);
|
seat_focus_surface(seat, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(input_inhibit_blocks_surface(seat, view->surface->resource))
|
if (input_inhibit_blocks_surface(seat, view->surface->resource)) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (view->minimized) {
|
if (view->minimized) {
|
||||||
/* this will unmap and then focus */
|
/* this will unmap and then focus */
|
||||||
|
|
@ -131,7 +133,7 @@ desktop_focus_view(struct seat *seat, struct view *view)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some xwayland apps produce unmapped surfaces on startup and also leave
|
* Some xwayland apps produce unmapped surfaces on startup and also leave
|
||||||
* some unmapped surfaces kicking around on 'close' (for example * leafpad's
|
* some unmapped surfaces kicking around on 'close' (for example leafpad's
|
||||||
* "about" dialogue). Whilst this is not normally a problem, we have to be
|
* "about" dialogue). Whilst this is not normally a problem, we have to be
|
||||||
* careful when cycling between views. The only views we should focus are
|
* careful when cycling between views. The only views we should focus are
|
||||||
* those that are already mapped and those that have been minimized.
|
* those that are already mapped and those that have been minimized.
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ handle_compositor_keybindings(struct wl_listener *listener,
|
||||||
}
|
}
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
keyboard_key_notify(struct wl_listener *listener, void *data)
|
keyboard_key_notify(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
|
|
@ -129,9 +130,10 @@ keyboard_key_notify(struct wl_listener *listener, void *data)
|
||||||
|
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
if(!seat->active_client_while_inhibited)
|
|
||||||
/* ignore labwc keybindings if input is inhibited */
|
/* ignore labwc keybindings if input is inhibited */
|
||||||
|
if (!seat->active_client_while_inhibited) {
|
||||||
handled = handle_compositor_keybindings(listener, event);
|
handled = handle_compositor_keybindings(listener, event);
|
||||||
|
}
|
||||||
|
|
||||||
if (!handled) {
|
if (!handled) {
|
||||||
wlr_seat_set_keyboard(wlr_seat, device);
|
wlr_seat_set_keyboard(wlr_seat, device);
|
||||||
|
|
|
||||||
36
src/output.c
36
src/output.c
|
|
@ -18,7 +18,7 @@
|
||||||
#include "ssd.h"
|
#include "ssd.h"
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
|
|
||||||
//#define DEBUG 1
|
#define DEBUG (0)
|
||||||
|
|
||||||
typedef void (*surface_iterator_func_t)(struct output *output,
|
typedef void (*surface_iterator_func_t)(struct output *output,
|
||||||
struct wlr_surface *surface, struct wlr_box *box,
|
struct wlr_surface *surface, struct wlr_box *box,
|
||||||
|
|
@ -848,8 +848,8 @@ new_output_notify(struct wl_listener *listener, void *data)
|
||||||
* a black screen. See sway@4cdc4ac6
|
* a black screen. See sway@4cdc4ac6
|
||||||
*/
|
*/
|
||||||
if (!wlr_output_test(wlr_output)) {
|
if (!wlr_output_test(wlr_output)) {
|
||||||
wlr_log(WLR_DEBUG, "preferred mode rejected, falling back to "
|
wlr_log(WLR_DEBUG,
|
||||||
"another mode");
|
"preferred mode rejected, falling back to another mode");
|
||||||
struct wlr_output_mode *mode;
|
struct wlr_output_mode *mode;
|
||||||
wl_list_for_each(mode, &wlr_output->modes, link) {
|
wl_list_for_each(mode, &wlr_output->modes, link) {
|
||||||
if (mode == preferred_mode) {
|
if (mode == preferred_mode) {
|
||||||
|
|
@ -922,7 +922,8 @@ output_init(struct server *server)
|
||||||
output_manager_init(server);
|
output_manager_init(server);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void output_config_apply(struct server *server,
|
static void
|
||||||
|
output_config_apply(struct server *server,
|
||||||
struct wlr_output_configuration_v1 *config)
|
struct wlr_output_configuration_v1 *config)
|
||||||
{
|
{
|
||||||
server->pending_output_config = config;
|
server->pending_output_config = config;
|
||||||
|
|
@ -961,13 +962,15 @@ static void output_config_apply(struct server *server,
|
||||||
server->pending_output_config = NULL;
|
server->pending_output_config = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool verify_output_config_v1(const struct wlr_output_configuration_v1 *config)
|
static bool
|
||||||
|
verify_output_config_v1(const struct wlr_output_configuration_v1 *config)
|
||||||
{
|
{
|
||||||
//TODO implement
|
/* TODO implement */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_output_manager_apply(struct wl_listener *listener, void* data)
|
static void
|
||||||
|
handle_output_manager_apply(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
struct server *server = wl_container_of(listener, server, output_manager_apply);
|
struct server *server = wl_container_of(listener, server, output_manager_apply);
|
||||||
struct wlr_output_configuration_v1 *config = data;
|
struct wlr_output_configuration_v1 *config = data;
|
||||||
|
|
@ -988,10 +991,11 @@ static void handle_output_manager_apply(struct wl_listener *listener, void* data
|
||||||
* a struct that we send to clients via the wlr_output_configuration v1
|
* a struct that we send to clients via the wlr_output_configuration v1
|
||||||
* interface
|
* interface
|
||||||
*/
|
*/
|
||||||
static struct wlr_output_configuration_v1 *create_output_config(struct server *server)
|
static struct
|
||||||
|
wlr_output_configuration_v1 *create_output_config(struct server *server)
|
||||||
{
|
{
|
||||||
struct wlr_output_configuration_v1 *config = wlr_output_configuration_v1_create();
|
struct wlr_output_configuration_v1 *config = wlr_output_configuration_v1_create();
|
||||||
if(config == NULL) {
|
if (!config) {
|
||||||
wlr_log(WLR_ERROR, "wlr_output_configuration_v1_create()");
|
wlr_log(WLR_ERROR, "wlr_output_configuration_v1_create()");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -1001,31 +1005,32 @@ static struct wlr_output_configuration_v1 *create_output_config(struct server *s
|
||||||
struct wlr_output_configuration_head_v1 *head =
|
struct wlr_output_configuration_head_v1 *head =
|
||||||
wlr_output_configuration_head_v1_create(config,
|
wlr_output_configuration_head_v1_create(config,
|
||||||
output->wlr_output);
|
output->wlr_output);
|
||||||
if (head == NULL) {
|
if (!head) {
|
||||||
wlr_log(WLR_ERROR, "wlr_output_configuration_head_v1_create()");
|
wlr_log(WLR_ERROR, "wlr_output_configuration_head_v1_create()");
|
||||||
wlr_output_configuration_v1_destroy(config);
|
wlr_output_configuration_v1_destroy(config);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
struct wlr_box *box = wlr_output_layout_get_box(server->output_layout,
|
struct wlr_box *box = wlr_output_layout_get_box(server->output_layout,
|
||||||
output->wlr_output);
|
output->wlr_output);
|
||||||
if (box != NULL) {
|
if (box) {
|
||||||
head->state.x = box->x;
|
head->state.x = box->x;
|
||||||
head->state.y = box->y;
|
head->state.y = box->y;
|
||||||
} else {
|
} else {
|
||||||
wlr_log(WLR_ERROR, "failed to get output layout box");
|
wlr_log(WLR_ERROR, "failed to get output layout box");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_output_layout_change(struct wl_listener *listener, void *data) {
|
static void
|
||||||
|
handle_output_layout_change(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
struct server *server = wl_container_of(listener, server, output_layout_change);
|
struct server *server = wl_container_of(listener, server, output_layout_change);
|
||||||
|
|
||||||
bool done_changing = server->pending_output_config == NULL;
|
bool done_changing = server->pending_output_config == NULL;
|
||||||
if (done_changing) {
|
if (done_changing) {
|
||||||
struct wlr_output_configuration_v1 *config = create_output_config(server);
|
struct wlr_output_configuration_v1 *config = create_output_config(server);
|
||||||
if(config != NULL) {
|
if (config) {
|
||||||
wlr_output_manager_v1_set_configuration(server->output_manager, config);
|
wlr_output_manager_v1_set_configuration(server->output_manager, config);
|
||||||
} else {
|
} else {
|
||||||
wlr_log(WLR_ERROR, "wlr_output_manager_v1_set_configuration()");
|
wlr_log(WLR_ERROR, "wlr_output_manager_v1_set_configuration()");
|
||||||
|
|
@ -1033,7 +1038,8 @@ static void handle_output_layout_change(struct wl_listener *listener, void *data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void output_manager_init(struct server *server)
|
void
|
||||||
|
output_manager_init(struct server *server)
|
||||||
{
|
{
|
||||||
server->output_manager = wlr_output_manager_v1_create(server->wl_display);
|
server->output_manager = wlr_output_manager_v1_create(server->wl_display);
|
||||||
|
|
||||||
|
|
|
||||||
58
src/server.c
58
src/server.c
|
|
@ -79,62 +79,68 @@ drop_permissions(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void seat_inhibit_input(struct seat *seat, struct wl_client *active_client)
|
static void
|
||||||
|
seat_inhibit_input(struct seat *seat, struct wl_client *active_client)
|
||||||
{
|
{
|
||||||
seat->active_client_while_inhibited = active_client;
|
seat->active_client_while_inhibited = active_client;
|
||||||
|
|
||||||
if (seat->focused_layer &&
|
if (seat->focused_layer &&
|
||||||
(wl_resource_get_client(seat->focused_layer->resource) !=
|
(wl_resource_get_client(seat->focused_layer->resource) !=
|
||||||
active_client))
|
active_client)) {
|
||||||
{
|
|
||||||
seat_set_focus_layer(seat, NULL);
|
seat_set_focus_layer(seat, NULL);
|
||||||
}
|
}
|
||||||
struct wlr_surface * previous_kb_surface = seat->seat->keyboard_state.focused_surface;
|
struct wlr_surface *previous_kb_surface =
|
||||||
|
seat->seat->keyboard_state.focused_surface;
|
||||||
if (previous_kb_surface &&
|
if (previous_kb_surface &&
|
||||||
wl_resource_get_client(previous_kb_surface->resource) != active_client) {
|
wl_resource_get_client(previous_kb_surface->resource) != active_client) {
|
||||||
seat_focus_surface(seat, NULL); /* keyboard focus */
|
seat_focus_surface(seat, NULL); /* keyboard focus */
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_seat_client * previous_ptr_client = seat->seat->pointer_state.focused_client;
|
struct wlr_seat_client *previous_ptr_client =
|
||||||
|
seat->seat->pointer_state.focused_client;
|
||||||
if (previous_ptr_client &&
|
if (previous_ptr_client &&
|
||||||
(previous_ptr_client->client != active_client)) {
|
(previous_ptr_client->client != active_client)) {
|
||||||
wlr_seat_pointer_clear_focus(seat->seat);
|
wlr_seat_pointer_clear_focus(seat->seat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void seat_disinhibit_input(struct seat *seat)
|
static void
|
||||||
|
seat_disinhibit_input(struct seat *seat)
|
||||||
{
|
{
|
||||||
seat->active_client_while_inhibited = NULL;
|
seat->active_client_while_inhibited = NULL;
|
||||||
// Triggers a refocus of the topmost surface layer if necessary
|
|
||||||
// TODO: Make layer surface focus per-output based on cursor position
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Triggers a refocus of the topmost surface layer if necessary
|
||||||
|
* TODO: Make layer surface focus per-output based on cursor position
|
||||||
|
*/
|
||||||
struct output *output;
|
struct output *output;
|
||||||
wl_list_for_each(output, &seat->server->outputs, link)
|
wl_list_for_each(output, &seat->server->outputs, link) {
|
||||||
arrange_layers(output);
|
arrange_layers(output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void handle_input_inhibit(struct wl_listener *listener, void *data) {
|
static void
|
||||||
|
handle_input_inhibit(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
wlr_log(WLR_INFO, "activate input inhibit");
|
wlr_log(WLR_INFO, "activate input inhibit");
|
||||||
|
|
||||||
struct server *server = wl_container_of(
|
struct server *server =
|
||||||
listener, server, input_inhibit_activate);
|
wl_container_of(listener, server, input_inhibit_activate);
|
||||||
|
seat_inhibit_input(&server->seat, server->input_inhibit->active_client);
|
||||||
seat_inhibit_input(&server->seat,
|
|
||||||
server->input_inhibit->active_client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_input_disinhibit(struct wl_listener *listener, void *data) {
|
static void
|
||||||
|
handle_input_disinhibit(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
wlr_log(WLR_INFO, "deactivate input inhibit");
|
wlr_log(WLR_INFO, "deactivate input inhibit");
|
||||||
|
|
||||||
struct server *server = wl_container_of(
|
struct server *server =
|
||||||
listener, server, input_inhibit_deactivate);
|
wl_container_of(listener, server, input_inhibit_deactivate);
|
||||||
|
|
||||||
seat_disinhibit_input(&server->seat);
|
seat_disinhibit_input(&server->seat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
server_init(struct server *server)
|
server_init(struct server *server)
|
||||||
{
|
{
|
||||||
|
|
@ -260,17 +266,19 @@ server_init(struct server *server)
|
||||||
wlr_data_control_manager_v1_create(server->wl_display);
|
wlr_data_control_manager_v1_create(server->wl_display);
|
||||||
wlr_gamma_control_manager_v1_create(server->wl_display);
|
wlr_gamma_control_manager_v1_create(server->wl_display);
|
||||||
|
|
||||||
// struct wlr_input_inhibit_manager *input_inhibit_mgr = NULL;
|
server->input_inhibit =
|
||||||
server->input_inhibit = wlr_input_inhibit_manager_create(server->wl_display);
|
wlr_input_inhibit_manager_create(server->wl_display);
|
||||||
if (!server->input_inhibit) {
|
if (!server->input_inhibit) {
|
||||||
wlr_log(WLR_ERROR, "unable to create the input inhibit manager");
|
wlr_log(WLR_ERROR, "unable to create input inhibit manager");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_signal_add(&server->input_inhibit->events.activate, &server->input_inhibit_activate);
|
wl_signal_add(&server->input_inhibit->events.activate,
|
||||||
|
&server->input_inhibit_activate);
|
||||||
server->input_inhibit_activate.notify = handle_input_inhibit;
|
server->input_inhibit_activate.notify = handle_input_inhibit;
|
||||||
|
|
||||||
wl_signal_add(&server->input_inhibit->events.deactivate, &server->input_inhibit_deactivate);
|
wl_signal_add(&server->input_inhibit->events.deactivate,
|
||||||
|
&server->input_inhibit_deactivate);
|
||||||
server->input_inhibit_deactivate.notify = handle_input_disinhibit;
|
server->input_inhibit_deactivate.notify = handle_input_disinhibit;
|
||||||
|
|
||||||
server->foreign_toplevel_manager =
|
server->foreign_toplevel_manager =
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ ssd_box(struct view *view, enum ssd_part_type type)
|
||||||
box.x = view->x - theme->border_width;
|
box.x = view->x - theme->border_width;
|
||||||
box.y = view->y + view->h;
|
box.y = view->y + view->h;
|
||||||
box.width = view->w + 2 * theme->border_width;
|
box.width = view->w + 2 * theme->border_width;
|
||||||
box.height = +theme->border_width + INVISIBLE_MARGIN;
|
box.height = theme->border_width + INVISIBLE_MARGIN;
|
||||||
break;
|
break;
|
||||||
case LAB_SSD_PART_LEFT:
|
case LAB_SSD_PART_LEFT:
|
||||||
box.x = view->x - theme->border_width - INVISIBLE_MARGIN;
|
box.x = view->x - theme->border_width - INVISIBLE_MARGIN;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue