mirror of
https://github.com/swaywm/sway.git
synced 2026-04-28 06:46:26 -04:00
Merge 2e570bbb90 into 6793648f8e
This commit is contained in:
commit
53dea65cd0
11 changed files with 130 additions and 68 deletions
|
|
@ -77,6 +77,9 @@ struct sway_container {
|
|||
bool is_focused;
|
||||
bool sticky; // floating view always visible on its output
|
||||
|
||||
// Custom arrange function
|
||||
void (*arrange)(struct sway_container *, double width, double height);
|
||||
|
||||
// Attributes that mostly views have.
|
||||
char *name;
|
||||
char *class;
|
||||
|
|
|
|||
|
|
@ -5,40 +5,43 @@
|
|||
#include <wlc/wlc-wayland.h>
|
||||
#include "wayland-desktop-shell-server-protocol.h"
|
||||
#include "list.h"
|
||||
#include "container.h"
|
||||
|
||||
struct background_config {
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
// we need the wl_resource of the surface in the destructor
|
||||
struct wl_resource *wl_surface_res;
|
||||
wlc_handle output;
|
||||
wlc_handle handle;
|
||||
wlc_resource surface;
|
||||
// we need the wl_resource of the surface in the destructor
|
||||
struct wl_resource *wl_surface_res;
|
||||
};
|
||||
|
||||
struct panel_config {
|
||||
// wayland resource used in callbacks, is used to track this panel
|
||||
struct wl_resource *wl_resource;
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
// we need the wl_resource of the surface in the destructor
|
||||
struct wl_resource *wl_surface_res;
|
||||
enum desktop_shell_panel_position panel_position;
|
||||
// wayland resource used in callbacks, is used to track this panel
|
||||
struct wl_resource *wl_resource;
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
// we need the wl_resource of the surface in the destructor
|
||||
struct wl_resource *wl_surface_res;
|
||||
enum desktop_shell_panel_position panel_position;
|
||||
};
|
||||
|
||||
struct desktop_shell_state {
|
||||
list_t *backgrounds;
|
||||
list_t *panels;
|
||||
list_t *lock_surfaces;
|
||||
bool is_locked;
|
||||
struct wlc_size panel_size;
|
||||
list_t *backgrounds;
|
||||
list_t *panels;
|
||||
list_t *lock_surfaces;
|
||||
bool is_locked;
|
||||
struct wlc_size panel_size;
|
||||
};
|
||||
|
||||
struct swaylock_state {
|
||||
bool active;
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
bool active;
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
};
|
||||
|
||||
extern struct desktop_shell_state desktop_shell;
|
||||
|
||||
void register_extensions(void);
|
||||
void arrange_background_view(swayc_t *view, double width, double height);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@ void get_absolute_position(swayc_t *container, struct wlc_point *point);
|
|||
// given wlc_point.
|
||||
void get_absolute_center_position(swayc_t *container, struct wlc_point *point);
|
||||
|
||||
struct output_config *config_for_output(wlc_handle output);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue