diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-04-03 21:53:43 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-04-04 20:08:21 +0300 |
commit | 75e7bd24ccb9731065bb7f8313aa53ba11ddc420 (patch) | |
tree | 2522f31626a21b42c2496a32266eafd3b7d66f50 /include | |
parent | 0ad905f23cc2862c96401b6a27d918b237db35b5 (diff) | |
download | sway-75e7bd24ccb9731065bb7f8313aa53ba11ddc420.tar.xz |
swaybg: one instance for all outputs
This makes it so there will only be one swaybg instance running
instead of one per output. swaybg's cli has been changed to a xrandr
like interface, where you select an output and then change properties
for that output and then select another output and repeat. This also
makes it so swaybg is only killed and respawned when a background
changes or when reloading.
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 10 | ||||
-rw-r--r-- | include/sway/output.h | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index d49120a0..fe06fb9d 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -424,7 +424,6 @@ struct sway_config { list_t *active_bar_modifiers; struct sway_mode *current_mode; struct bar_config *current_bar; - char *swaybg_command; uint32_t floating_mod; bool floating_mod_inverse; uint32_t dragging_key; @@ -447,6 +446,11 @@ struct sway_config { enum sway_popup_during_fullscreen popup_during_fullscreen; bool xwayland; + // swaybg + char *swaybg_command; + struct wl_client *swaybg_client; + struct wl_listener swaybg_client_destroy; + // Flags enum focus_follows_mouse_mode focus_follows_mouse; enum mouse_warping_mode mouse_warping; @@ -607,6 +611,8 @@ void reset_outputs(void); void free_output_config(struct output_config *oc); +bool spawn_swaybg(void); + int workspace_output_cmp_workspace(const void *a, const void *b); int sway_binding_cmp(const void *a, const void *b); @@ -625,8 +631,6 @@ void load_swaybar(struct bar_config *bar); void load_swaybars(void); -void terminate_swaybg(pid_t pid); - struct bar_config *default_bar_config(void); void free_bar_config(struct bar_config *bar); diff --git a/include/sway/output.h b/include/sway/output.h index c336c559..cae77e2e 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -38,8 +38,6 @@ struct sway_output { struct sway_output_state current; - struct wl_client *swaybg_client; - struct wl_listener destroy; struct wl_listener mode; struct wl_listener transform; @@ -47,7 +45,6 @@ struct sway_output { struct wl_listener present; struct wl_listener damage_destroy; struct wl_listener damage_frame; - struct wl_listener swaybg_client_destroy; struct { struct wl_signal destroy; |