sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 4bb45abc46def3f05f83561745349c121e6a8a2a
parent 6d94f77457e34fc8a295e18a27e10fb39ee3b8a0
Author: David Eklov <david.eklov@gmail.com>
Date:   Sun, 10 Jul 2016 11:03:39 -0500

Don't treat backgrounds as shell surfaces

This code had some issues. Remove it now so that we can start clean and fix
it later.

Diffstat:
Minclude/extensions.h | 2--
Msway/extensions.c | 1-
Msway/handlers.c | 13+------------
3 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/include/extensions.h b/include/extensions.h @@ -11,8 +11,6 @@ struct background_config { wlc_resource surface; // we need the wl_resource of the surface in the destructor struct wl_resource *wl_surface_res; - // used to determine if client is a background - struct wl_client *client; }; struct panel_config { diff --git a/sway/extensions.c b/sway/extensions.c @@ -73,7 +73,6 @@ static void set_background(struct wl_client *client, struct wl_resource *resourc } sway_log(L_DEBUG, "Setting surface %p as background for output %d", surface, (int)output); struct background_config *config = malloc(sizeof(struct background_config)); - config->client = client; config->output = output; config->surface = wlc_resource_from_wl_surface_resource(surface); config->wl_surface_res = surface; diff --git a/sway/handlers.c b/sway/handlers.c @@ -176,17 +176,6 @@ static void handle_output_focused(wlc_handle output, bool focus) { } } -static bool client_is_background(struct wl_client *client) { - int i; - for (i = 0; i < desktop_shell.backgrounds->length; i++) { - struct background_config *config = desktop_shell.backgrounds->items[i]; - if (config->client == client) { - return true; - } - } - return false; -} - static bool client_is_panel(struct wl_client *client) { int i; for (i = 0; i < desktop_shell.panels->length; i++) { @@ -229,7 +218,7 @@ static bool handle_view_created(wlc_handle handle) { struct wl_client *client = wlc_view_get_wl_client(handle); pid_t pid; - if (client_is_background(client) || client_is_panel(client)) { + if (client_is_panel(client)) { return true; }