mirror of
https://github.com/labwc/labwc.git
synced 2026-02-22 01:40:25 -05:00
Add FocusOutput action
Fixes #806 Suggested-by: @EysseW Tested-by: @EysseW
This commit is contained in:
parent
037dace5bc
commit
a0b5a80ce1
5 changed files with 76 additions and 0 deletions
16
src/output.c
16
src/output.c
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#include <assert.h>
|
||||
#include <strings.h>
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
#include <wlr/types/wlr_drm_lease_v1.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
|
|
@ -458,6 +459,21 @@ output_from_wlr_output(struct server *server, struct wlr_output *wlr_output)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
struct output *
|
||||
output_from_name(struct server *server, const char *name)
|
||||
{
|
||||
struct output *output;
|
||||
wl_list_for_each(output, &server->outputs, link) {
|
||||
if (!output_is_usable(output) || !output->wlr_output->name) {
|
||||
continue;
|
||||
}
|
||||
if (!strcasecmp(name, output->wlr_output->name)) {
|
||||
return output;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct output *
|
||||
output_nearest_to(struct server *server, int lx, int ly)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue