Client/Layout: Fix focus issue (#1) with max layout.
This commit is contained in:
parent
ec834a4cbc
commit
33689fc5a0
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
17
src/util.c
17
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
|
||||
*/
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user