Client: Add 2 uicb function requested by bacardi95: client_screen_{next, prev}.
This commit is contained in:
parent
d6b1a18867
commit
ec009c98e1
45
src/client.c
45
src/client.c
@ -871,3 +871,48 @@ client_unmap(Client *c)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Change client of screen to next screen
|
||||||
|
* \cmd uicb_t type unused
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
uicb_client_screen_next(uicb_t cmd)
|
||||||
|
{
|
||||||
|
int os;
|
||||||
|
|
||||||
|
CHECK(sel);
|
||||||
|
|
||||||
|
/* Save old client screen to arrange */
|
||||||
|
os = sel->screen;
|
||||||
|
|
||||||
|
/* Set the new client screen */
|
||||||
|
sel->screen = (sel->screen + 1 > screen_count() - 1) ? 0 : sel->screen + 1;
|
||||||
|
|
||||||
|
/* Arrange */
|
||||||
|
arrange(os, True);
|
||||||
|
arrange(sel->screen, True);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Change client of screen to prev screen
|
||||||
|
* \cmd uicb_t type unused
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
uicb_client_screen_prev(uicb_t cmd)
|
||||||
|
{
|
||||||
|
int os;
|
||||||
|
|
||||||
|
CHECK(sel);
|
||||||
|
|
||||||
|
/* Save old client screen to arrange */
|
||||||
|
os = sel->screen;
|
||||||
|
|
||||||
|
/* Set the new client screen */
|
||||||
|
sel->screen = (sel->screen - 1 < 0) ? screen_count() - 1 : sel->screen - 1;
|
||||||
|
|
||||||
|
/* Arrange */
|
||||||
|
arrange(os, True);
|
||||||
|
arrange(sel->screen, True);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|||||||
@ -44,6 +44,8 @@ conf_init_func_list(void)
|
|||||||
{"client_kill", uicb_client_kill },
|
{"client_kill", uicb_client_kill },
|
||||||
{"client_prev", uicb_client_prev },
|
{"client_prev", uicb_client_prev },
|
||||||
{"client_next", uicb_client_next },
|
{"client_next", uicb_client_next },
|
||||||
|
{"client_screen_next", uicb_client_screen_next },
|
||||||
|
{"client_screen_prev", uicb_client_screen_prev },
|
||||||
{"toggle_max", uicb_togglemax },
|
{"toggle_max", uicb_togglemax },
|
||||||
{"layout_next", uicb_layout_next },
|
{"layout_next", uicb_layout_next },
|
||||||
{"layout_prev", uicb_layout_prev },
|
{"layout_prev", uicb_layout_prev },
|
||||||
|
|||||||
@ -112,7 +112,7 @@ quit(void)
|
|||||||
IFREE(func_list);
|
IFREE(func_list);
|
||||||
IFREE(layout_list);
|
IFREE(layout_list);
|
||||||
|
|
||||||
/* Clean conf alloced thing {{{ */
|
/* Clean conf alloced thing */
|
||||||
IFREE(menulayout.item);
|
IFREE(menulayout.item);
|
||||||
|
|
||||||
if(conf.menu)
|
if(conf.menu)
|
||||||
@ -135,7 +135,6 @@ quit(void)
|
|||||||
IFREE(conf.titlebar.button);
|
IFREE(conf.titlebar.button);
|
||||||
IFREE(conf.client.mouse);
|
IFREE(conf.client.mouse);
|
||||||
IFREE(conf.root.mouse);
|
IFREE(conf.root.mouse);
|
||||||
/* }}} */
|
|
||||||
|
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
XCloseDisplay(dpy);
|
XCloseDisplay(dpy);
|
||||||
|
|||||||
@ -55,6 +55,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "structs.h"
|
#include "structs.h"
|
||||||
|
|
||||||
|
/* Optional dependences */
|
||||||
#ifdef HAVE_XINERAMA
|
#ifdef HAVE_XINERAMA
|
||||||
#include <X11/extensions/Xinerama.h>
|
#include <X11/extensions/Xinerama.h>
|
||||||
#endif
|
#endif
|
||||||
@ -166,6 +167,8 @@ void uicb_client_raise(uicb_t);
|
|||||||
void uicb_client_prev(uicb_t);
|
void uicb_client_prev(uicb_t);
|
||||||
void uicb_client_next(uicb_t);
|
void uicb_client_next(uicb_t);
|
||||||
void uicb_client_kill(uicb_t);
|
void uicb_client_kill(uicb_t);
|
||||||
|
void uicb_client_screen_next(uicb_t cmd);
|
||||||
|
void uicb_client_screen_prev(uicb_t cmd);
|
||||||
|
|
||||||
/* ewmh.c */
|
/* ewmh.c */
|
||||||
void ewmh_init_hints(void);
|
void ewmh_init_hints(void);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user