layout: Fix togglemax function
This commit is contained in:
parent
edd7ec5363
commit
24e0212c3b
@ -432,7 +432,7 @@ client_manage(Window w, XWindowAttributes *wa)
|
|||||||
* \param r Bool for resize hint or not
|
* \param r Bool for resize hint or not
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
client_moveresize(Client *c, XRectangle geo, bool r)
|
client_moveresize(Client *c, XRectangle geo, Bool r)
|
||||||
{
|
{
|
||||||
if(!c || c->state_dock)
|
if(!c || c->state_dock)
|
||||||
return;
|
return;
|
||||||
@ -511,12 +511,11 @@ client_moveresize(Client *c, XRectangle geo, bool r)
|
|||||||
void
|
void
|
||||||
client_maximize(Client *c)
|
client_maximize(Client *c)
|
||||||
{
|
{
|
||||||
CHECK(c);
|
|
||||||
|
|
||||||
XRectangle geo;
|
XRectangle geo;
|
||||||
|
|
||||||
|
CHECK(c);
|
||||||
|
|
||||||
client_raise(c);
|
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);
|
||||||
|
|
||||||
@ -533,7 +532,6 @@ client_maximize(Client *c)
|
|||||||
|
|
||||||
client_moveresize(c, geo, False);
|
client_moveresize(c, geo, False);
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -239,6 +239,7 @@ ewmh_manage_net_wm_state(long data_l[], Client *c)
|
|||||||
if(c->free)
|
if(c->free)
|
||||||
c->ogeo = c->geo;
|
c->ogeo = c->geo;
|
||||||
client_maximize(c);
|
client_maximize(c);
|
||||||
|
client_raise(c);
|
||||||
}
|
}
|
||||||
else if(data_l[0] == _NET_WM_STATE_REMOVE && c->state_fullscreen)
|
else if(data_l[0] == _NET_WM_STATE_REMOVE && c->state_fullscreen)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -491,15 +491,19 @@ uicb_togglemax(uicb_t cmd)
|
|||||||
|
|
||||||
if(!sel->max)
|
if(!sel->max)
|
||||||
{
|
{
|
||||||
sel->tile = sel->free = False;
|
sel->ogeo = sel->geo;
|
||||||
|
sel->tile = False;
|
||||||
client_maximize(sel);
|
client_maximize(sel);
|
||||||
|
client_raise(sel);
|
||||||
sel->max = True;
|
sel->max = True;
|
||||||
}
|
}
|
||||||
else if(sel->max)
|
else
|
||||||
{
|
{
|
||||||
sel->max = False;
|
sel->max = False;
|
||||||
tags[selscreen][seltag[selscreen]].layout.func();
|
tags[selscreen][seltag[selscreen]].layout.func();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,6 +48,8 @@ typedef unsigned char uchar;
|
|||||||
|
|
||||||
/* Enum */
|
/* Enum */
|
||||||
enum { CurNormal, CurResize, CurMove, CurLast };
|
enum { CurNormal, CurResize, CurMove, CurLast };
|
||||||
|
typedef enum { Top, Bottom, Right, Left, Center, PositionLast } Position;
|
||||||
|
|
||||||
/* Ewmh hints list */
|
/* Ewmh hints list */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -80,7 +82,6 @@ enum
|
|||||||
wmfs_current_layout,
|
wmfs_current_layout,
|
||||||
net_last
|
net_last
|
||||||
};
|
};
|
||||||
typedef enum { Top, Bottom, Right, Left, Center, PositionLast } Position;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BarWindow Structure
|
* BarWindow Structure
|
||||||
@ -201,9 +202,9 @@ typedef struct
|
|||||||
{
|
{
|
||||||
/* Misc option */
|
/* Misc option */
|
||||||
char *font;
|
char *font;
|
||||||
bool raisefocus;
|
Bool raisefocus;
|
||||||
bool raiseswitch;
|
Bool raiseswitch;
|
||||||
bool bartop;
|
Bool bartop;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -247,7 +248,7 @@ typedef struct
|
|||||||
Alias alias[256];
|
Alias alias[256];
|
||||||
Layout layout[NUM_OF_LAYOUT];
|
Layout layout[NUM_OF_LAYOUT];
|
||||||
int *ntag;
|
int *ntag;
|
||||||
bool tag_round;
|
Bool tag_round;
|
||||||
int nkeybind;
|
int nkeybind;
|
||||||
int nbutton;
|
int nbutton;
|
||||||
int nlayout;
|
int nlayout;
|
||||||
|
|||||||
@ -36,7 +36,6 @@
|
|||||||
/* Lib headers */
|
/* Lib headers */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -128,7 +127,7 @@ void client_kill(Client *c);
|
|||||||
Bool ishide(Client *c);
|
Bool ishide(Client *c);
|
||||||
void client_map(Client *c);
|
void client_map(Client *c);
|
||||||
void client_manage(Window w, XWindowAttributes *wa);
|
void client_manage(Window w, XWindowAttributes *wa);
|
||||||
void client_moveresize(Client *c, XRectangle geo, bool r);
|
void client_moveresize(Client *c, XRectangle geo, Bool r);
|
||||||
void client_maximize(Client *c);
|
void client_maximize(Client *c);
|
||||||
void client_size_hints(Client *c);
|
void client_size_hints(Client *c);
|
||||||
void client_raise(Client *c);
|
void client_raise(Client *c);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user