mirror of
https://github.com/labwc/labwc.git
synced 2026-02-10 04:27:47 -05:00
action: make "FocusOutput" behave like "MoveToOutput"
This commit is contained in:
parent
f2b6661db4
commit
dda47a5e14
10 changed files with 172 additions and 128 deletions
10
include/common/direction.h
Normal file
10
include/common/direction.h
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_DIRECTION_H
|
||||
#define LABWC_DIRECTION_H
|
||||
|
||||
#include "view.h"
|
||||
|
||||
enum wlr_direction direction_from_view_edge(enum view_edge edge);
|
||||
enum wlr_direction direction_get_opposite(enum wlr_direction direction);
|
||||
|
||||
#endif /* LABWC_DIRECTION_H */
|
||||
|
|
@ -460,6 +460,7 @@ void desktop_focus_view_or_surface(struct seat *seat, struct view *view,
|
|||
|
||||
void desktop_arrange_all_views(struct server *server);
|
||||
void desktop_focus_output(struct output *output);
|
||||
void warp_cursor(struct view *view);
|
||||
struct view *desktop_topmost_focusable_view(struct server *server);
|
||||
|
||||
/**
|
||||
|
|
@ -539,6 +540,21 @@ struct output *output_from_wlr_output(struct server *server,
|
|||
struct output *output_from_name(struct server *server, const char *name);
|
||||
struct output *output_nearest_to(struct server *server, int lx, int ly);
|
||||
struct output *output_nearest_to_cursor(struct server *server);
|
||||
|
||||
/**
|
||||
* output_get_adjacent() - get next output, in a given direction,
|
||||
* from a given output
|
||||
*
|
||||
* @output: reference output
|
||||
* @edge: direction in which to look for the nearest output
|
||||
* @wrap: if true, wrap around at layout edge
|
||||
*
|
||||
* Note: if output is NULL, the output nearest the cursor will be used as the
|
||||
* reference instead.
|
||||
*/
|
||||
struct output *output_get_adjacent(struct output *output,
|
||||
enum view_edge edge, bool wrap);
|
||||
|
||||
bool output_is_usable(struct output *output);
|
||||
void output_update_usable_area(struct output *output);
|
||||
void output_update_all_usable_areas(struct server *server, bool layout_changed);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#ifndef LABWC_VIEW_H
|
||||
#define LABWC_VIEW_H
|
||||
|
||||
#include "config/rcxml.h"
|
||||
#include "config.h"
|
||||
#include "ssd.h"
|
||||
#include <stdbool.h>
|
||||
|
|
@ -482,7 +483,7 @@ void view_center(struct view *view, const struct wlr_box *ref);
|
|||
* @policy: placement policy to apply
|
||||
*/
|
||||
void view_place_by_policy(struct view *view, bool allow_cursor,
|
||||
enum view_placement_policy);
|
||||
enum view_placement_policy policy);
|
||||
void view_constrain_size_to_that_of_usable_area(struct view *view);
|
||||
|
||||
void view_restore_to(struct view *view, struct wlr_box geometry);
|
||||
|
|
@ -548,8 +549,6 @@ void view_on_output_destroy(struct view *view);
|
|||
void view_connect_map(struct view *view, struct wlr_surface *surface);
|
||||
void view_destroy(struct view *view);
|
||||
|
||||
struct output *view_get_adjacent_output(struct view *view, enum view_edge edge,
|
||||
bool wrap);
|
||||
enum view_axis view_axis_parse(const char *direction);
|
||||
enum view_edge view_edge_parse(const char *direction);
|
||||
enum view_placement_policy view_placement_parse(const char *policy);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue