Client/Layout: Fix focus issue (#1) with max layout.

This commit is contained in:
Martin Duquesnoy 2009-07-22 14:27:52 +02:00
parent ec834a4cbc
commit 33689fc5a0
5 changed files with 9 additions and 21 deletions

View File

@ -645,8 +645,6 @@ client_maximize(Client *c)
if(!c || c->state_fullscreen) if(!c || c->state_fullscreen)
return; return;
client_focus(c);
c->screen = screen_get_with_geo(c->geo.x, c->geo.y); c->screen = screen_get_with_geo(c->geo.x, c->geo.y);
geo.x = sgeo[c->screen].x; geo.x = sgeo[c->screen].x;

View File

@ -66,7 +66,7 @@ frame_create(Client *c)
c->frame_geo.y, c->frame_geo.y,
c->frame_geo.width, c->frame_geo.width,
c->frame_geo.height, 0, c->frame_geo.height, 0,
CWOverrideRedirect|CWBackPixmap|CWEventMask, CWOverrideRedirect | CWBackPixmap | CWEventMask,
c->colors.frame, &at); c->colors.frame, &at);

View File

@ -143,12 +143,17 @@ void
maxlayout(int screen) maxlayout(int screen)
{ {
Client *c; 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->tile = False;
c->lmax = True; c->lmax = True;
client_maximize(c); client_maximize(c);
/* Focus the first client */
if(!i)
client_focus(c);
} }
ewmh_update_current_tag_prop(); ewmh_update_current_tag_prop();

View File

@ -18,7 +18,7 @@
* this software without specific prior written permission. * this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * 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 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
@ -199,21 +199,6 @@ get_mouse_pos(void)
return ret; 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 /** Execute a sh command
* \param cmd Command * \param cmd Command
*/ */

View File

@ -245,7 +245,7 @@ uicb_reload(uicb_t cmd)
return; 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). execute when wmfs will be already running).
\return False if wmfs is not running \return False if wmfs is not running
*/ */