[PATCH] clientlist: use smart_window_surroundings_active()

Simon Ruderich simon at ruderich.org
Wed Mar 26 23:47:22 CET 2014


---
Hello,

This reduces a little bit of duplication.

Regards
Simon

 src/clientlist.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/clientlist.c b/src/clientlist.c
index 6d634b1..deaa090 100644
--- a/src/clientlist.c
+++ b/src/clientlist.c
@@ -36,7 +36,6 @@ int g_monitor_float_treshold = 24;
 
 int* g_raise_on_focus;
 int* g_snap_gap;
-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;
 }
 
 void client_window_unfocus(HSClient* client) {
-- 
1.8.4.rc4

-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://listi.jpberlin.de/pipermail/hlwm/attachments/20140326/fa8ca3ff/attachment.asc>


More information about the hlwm mailing list