[PATCH] clientlist: use smart_window_surroundings_active()
Thorsten Wißmann
edu at thorsten-wissmann.de
Thu Mar 27 01:54:13 CET 2014
Hi,
On Wed, Mar 26, 2014 at 11:47:22PM +0100, Simon Ruderich wrote:
> This reduces a little bit of duplication.
Yes, and...
> -int* g_smart_window_surroundings;
>
> static GHashTable* g_clients; // container of all clients
> static HSObject* g_client_object;
> @@ -426,11 +425,10 @@ bool client_needs_minimal_dec(HSClient* client, HSFrame* frame) {
> frame = find_frame_with_client(client->tag->frame, client);
> HSAssert(frame != NULL);
> }
> - if (!*g_smart_window_surroundings) return false;
> + if (!smart_window_surroundings_active(frame)) return false;
> if (client->pseudotile) return false;
> if (is_client_floated(client)) return false;
> - return (frame->content.clients.count == 1
> - || frame->content.clients.layout == LAYOUT_MAX);
> + return true;
> }
g_smart_window_surroundings was not initialized before in a sane way. It
only was initializied because there was a global of the same name in the
layout.c file. Maybe I should define nearly all global variables
static... Anyway:
7e60762 clientlist: use smart_window_surroundings_active()
Regards,
Thorsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20140327/5c24cbf6/attachment.sig>
More information about the hlwm
mailing list