diff --git a/src/client.c b/src/client.c index 0c6f273..a42ee87 100644 --- a/src/client.c +++ b/src/client.c @@ -645,8 +645,6 @@ client_maximize(Client *c) if(!c || c->state_fullscreen) return; - client_focus(c); - c->screen = screen_get_with_geo(c->geo.x, c->geo.y); geo.x = sgeo[c->screen].x; diff --git a/src/frame.c b/src/frame.c index c6ba71d..c45139b 100644 --- a/src/frame.c +++ b/src/frame.c @@ -66,7 +66,7 @@ frame_create(Client *c) c->frame_geo.y, c->frame_geo.width, c->frame_geo.height, 0, - CWOverrideRedirect|CWBackPixmap|CWEventMask, + CWOverrideRedirect | CWBackPixmap | CWEventMask, c->colors.frame, &at); diff --git a/src/layout.c b/src/layout.c index 687c739..58fa450 100644 --- a/src/layout.c +++ b/src/layout.c @@ -143,12 +143,17 @@ void maxlayout(int screen) { Client *c; + int i; - for(c = tiled_client(screen, clients); c; c = tiled_client(screen, c->next)) + for(i = 0, c = tiled_client(screen, clients); c; c = tiled_client(screen, c->next), ++i) { c->tile = False; c->lmax = True; client_maximize(c); + + /* Focus the first client */ + if(!i) + client_focus(c); } ewmh_update_current_tag_prop(); diff --git a/src/util.c b/src/util.c index 95bbcc3..04b3d3d 100644 --- a/src/util.c +++ b/src/util.c @@ -18,7 +18,7 @@ * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +5B* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, @@ -199,21 +199,6 @@ get_mouse_pos(void) return ret; } -/** Transform one character to string - *\param ch The character that will be tranforming - *\return The string. - */ -char* -char_to_str(const char c) -{ - static char s[2]; - - s[0] = c; - s[1] = '\0'; - - return s; -} - /** Execute a sh command * \param cmd Command */ diff --git a/src/wmfs.c b/src/wmfs.c index c6941ee..34432af 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -245,7 +245,7 @@ uicb_reload(uicb_t cmd) return; } -/** Check if wmfs is running (for function that will be +/** Check if wmfs is running (for functions that will be execute when wmfs will be already running). \return False if wmfs is not running */