support NET_WM_STATE_ABOVE in spot 3
This commit is contained in:
13
action.c
13
action.c
@@ -27,8 +27,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
void action_move(void *data, int num, Client *cli)
|
void action_move(void *data, int num, Client *cli)
|
||||||
{
|
{
|
||||||
if (!cli) return;
|
if (!cli) return;
|
||||||
client_raise_family(cli);
|
|
||||||
client_place_spot(cli, num, cli->monitor, 1);
|
client_place_spot(cli, num, cli->monitor, 1);
|
||||||
|
client_raise_family(cli);
|
||||||
current_spot = cli->spot; current_mon = cli->monitor;
|
current_spot = cli->spot; current_mon = cli->monitor;
|
||||||
spot_warp_pointer(cli->spot, cli->monitor);
|
spot_warp_pointer(cli->spot, cli->monitor);
|
||||||
}
|
}
|
||||||
@@ -36,8 +36,8 @@ void action_move(void *data, int num, Client *cli)
|
|||||||
void action_move_direction(void *data, int num, Client *cli)
|
void action_move_direction(void *data, int num, Client *cli)
|
||||||
{
|
{
|
||||||
if (!cli) return;
|
if (!cli) return;
|
||||||
client_raise_family(cli);
|
|
||||||
client_place_spot(cli, spot_choose_by_direction(cli->spot, cli->monitor, num), cli->monitor, 1);
|
client_place_spot(cli, spot_choose_by_direction(cli->spot, cli->monitor, num), cli->monitor, 1);
|
||||||
|
client_raise_family(cli);
|
||||||
current_spot = cli->spot; current_mon = cli->monitor;
|
current_spot = cli->spot; current_mon = cli->monitor;
|
||||||
spot_warp_pointer(cli->spot, cli->monitor);
|
spot_warp_pointer(cli->spot, cli->monitor);
|
||||||
}
|
}
|
||||||
@@ -100,9 +100,9 @@ void action_find_or_start(void *data, int num, Client *cli)
|
|||||||
void action_move_monitor(void *data, int num, Client *cli)
|
void action_move_monitor(void *data, int num, Client *cli)
|
||||||
{
|
{
|
||||||
if (!cli) return;
|
if (!cli) return;
|
||||||
client_raise_family(cli);
|
|
||||||
cli->monitor = MAX(0, MIN(current_mon+num, nmonitors-1));
|
cli->monitor = MAX(0, MIN(current_mon+num, nmonitors-1));
|
||||||
client_place_spot(cli, cli->spot, cli->monitor, 1);
|
client_place_spot(cli, cli->spot, cli->monitor, 1);
|
||||||
|
client_raise_family(cli);
|
||||||
current_mon = cli->monitor;
|
current_mon = cli->monitor;
|
||||||
spot_warp_pointer(cli->spot, cli->monitor);
|
spot_warp_pointer(cli->spot, cli->monitor);
|
||||||
}
|
}
|
||||||
@@ -152,6 +152,13 @@ void action_maximize_horz(void *data, int num, Client *cli)
|
|||||||
client_place_spot(cli, cli->spot, cli->monitor, 1);
|
client_place_spot(cli, cli->spot, cli->monitor, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void action_above(void *data, int num, Client *cli)
|
||||||
|
{
|
||||||
|
if (!cli) return;
|
||||||
|
cli->above = client_toggle_state(cli, atoms[_NET_WM_STATE_ABOVE]);
|
||||||
|
client_place_spot(cli, cli->spot, cli->monitor, 1);
|
||||||
|
}
|
||||||
|
|
||||||
void action_menu(void *data, int num, Client *cli)
|
void action_menu(void *data, int num, Client *cli)
|
||||||
{
|
{
|
||||||
menu_create(current_spot, current_mon);
|
menu_create(current_spot, current_mon);
|
||||||
|
|||||||
1
atom.c
1
atom.c
@@ -53,6 +53,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
X(_NET_WM_STATE_MAXIMIZE_VERT),\
|
X(_NET_WM_STATE_MAXIMIZE_VERT),\
|
||||||
X(_NET_WM_STATE_MAXIMIZE_HORZ),\
|
X(_NET_WM_STATE_MAXIMIZE_HORZ),\
|
||||||
X(_NET_WM_STATE_DEMANDS_ATTENTION),\
|
X(_NET_WM_STATE_DEMANDS_ATTENTION),\
|
||||||
|
X(_NET_WM_STATE_ABOVE),\
|
||||||
X(WM_NAME),\
|
X(WM_NAME),\
|
||||||
X(WM_DELETE_WINDOW),\
|
X(WM_DELETE_WINDOW),\
|
||||||
X(WM_CLIENT_LEADER),\
|
X(WM_CLIENT_LEADER),\
|
||||||
|
|||||||
8
client.c
8
client.c
@@ -112,6 +112,7 @@ Client* window_build_client(Window win)
|
|||||||
c->full = client_has_state(c, atoms[_NET_WM_STATE_FULLSCREEN]);
|
c->full = client_has_state(c, atoms[_NET_WM_STATE_FULLSCREEN]);
|
||||||
c->maxv = client_has_state(c, atoms[_NET_WM_STATE_MAXIMIZE_VERT]);
|
c->maxv = client_has_state(c, atoms[_NET_WM_STATE_MAXIMIZE_VERT]);
|
||||||
c->maxh = client_has_state(c, atoms[_NET_WM_STATE_MAXIMIZE_HORZ]);
|
c->maxh = client_has_state(c, atoms[_NET_WM_STATE_MAXIMIZE_HORZ]);
|
||||||
|
c->above = client_has_state(c, atoms[_NET_WM_STATE_ABOVE]);
|
||||||
|
|
||||||
GETPROP_LONG(win, atoms[XOAT_MAXIMIZE], &c->max, 1);
|
GETPROP_LONG(win, atoms[XOAT_MAXIMIZE], &c->max, 1);
|
||||||
|
|
||||||
@@ -297,8 +298,13 @@ void client_raise_family(Client *c)
|
|||||||
if (!c) return;
|
if (!c) return;
|
||||||
int i; Client *o; STACK_INIT(raise); STACK_INIT(family);
|
int i; Client *o; STACK_INIT(raise); STACK_INIT(family);
|
||||||
|
|
||||||
for_windows(i, o) if (o->type == atoms[_NET_WM_WINDOW_TYPE_DOCK])
|
for_windows(i, o)
|
||||||
|
{
|
||||||
|
if (o->type == atoms[_NET_WM_WINDOW_TYPE_DOCK])
|
||||||
client_stack_family(o, &raise);
|
client_stack_family(o, &raise);
|
||||||
|
if (o->above && c->spot != SPOT3 && o->spot == SPOT3)
|
||||||
|
client_stack_family(o, &raise);
|
||||||
|
}
|
||||||
|
|
||||||
while (c->transient && (o = window_build_client(c->transient)) && o->manage)
|
while (c->transient && (o = window_build_client(c->transient)) && o->manage)
|
||||||
c = family.clients[family.depth++] = o;
|
c = family.clients[family.depth++] = o;
|
||||||
|
|||||||
4
config.c
4
config.c
@@ -42,7 +42,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
#define CONFIG_ACTIONS "action_move_direction|action_move_monitor|action_focus_monitor|action_focus_direction" \
|
#define CONFIG_ACTIONS "action_move_direction|action_move_monitor|action_focus_monitor|action_focus_direction" \
|
||||||
"|action_move|action_focus|action_close|action_cycle|action_raise_nth|action_command|action_find_or_start" \
|
"|action_move|action_focus|action_close|action_cycle|action_raise_nth|action_command|action_find_or_start" \
|
||||||
"|action_fullscreen|action_maximize_vert|action_maximize_horz|action_maximize|action_menu"
|
"|action_fullscreen|action_maximize_vert|action_maximize_horz|action_maximize|action_above|action_menu"
|
||||||
|
|
||||||
void
|
void
|
||||||
rtrim(char *str)
|
rtrim(char *str)
|
||||||
@@ -373,6 +373,7 @@ configure()
|
|||||||
"action_maximize_vert",
|
"action_maximize_vert",
|
||||||
"action_maximize_horz",
|
"action_maximize_horz",
|
||||||
"action_maximize",
|
"action_maximize",
|
||||||
|
"action_above",
|
||||||
"action_menu",
|
"action_menu",
|
||||||
};
|
};
|
||||||
void *actions[] = {
|
void *actions[] = {
|
||||||
@@ -391,6 +392,7 @@ configure()
|
|||||||
action_maximize_vert,
|
action_maximize_vert,
|
||||||
action_maximize_horz,
|
action_maximize_horz,
|
||||||
action_maximize,
|
action_maximize,
|
||||||
|
action_above,
|
||||||
action_menu,
|
action_menu,
|
||||||
};
|
};
|
||||||
for (i = 0; i < sizeof(names) / sizeof(char*); i++)
|
for (i = 0; i < sizeof(names) / sizeof(char*); i++)
|
||||||
|
|||||||
3
xoat.c
3
xoat.c
@@ -89,7 +89,7 @@ typedef struct _Client {
|
|||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
Window transient, leader;
|
Window transient, leader;
|
||||||
Atom type, states[ATOMLIST+1];
|
Atom type, states[ATOMLIST+1];
|
||||||
short monitor, visible, manage, input, urgent, full, ours, maxv, maxh, bar, menu;
|
short monitor, visible, manage, input, urgent, full, ours, maxv, maxh, bar, menu, above;
|
||||||
unsigned long spot, max;
|
unsigned long spot, max;
|
||||||
char *class;
|
char *class;
|
||||||
} Client;
|
} Client;
|
||||||
@@ -153,6 +153,7 @@ void action_fullscreen(void*, int, Client*);
|
|||||||
void action_maximize_vert(void*, int, Client*);
|
void action_maximize_vert(void*, int, Client*);
|
||||||
void action_maximize_horz(void*, int, Client*);
|
void action_maximize_horz(void*, int, Client*);
|
||||||
void action_maximize(void*, int, Client*);
|
void action_maximize(void*, int, Client*);
|
||||||
|
void action_above(void*, int, Client*);
|
||||||
void action_menu(void*, int, Client*);
|
void action_menu(void*, int, Client*);
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user