handle screen changes
This commit is contained in:
parent
a73d635146
commit
914e908aa8
8
mouse.c
8
mouse.c
|
@ -42,7 +42,7 @@ extern AwesomeConf globalconf;
|
||||||
void
|
void
|
||||||
uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
|
uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int x, y, ocx, ocy, di, phys_screen;
|
int x, y, ocx, ocy, di, phys_screen, newscreen;
|
||||||
unsigned int dui;
|
unsigned int dui;
|
||||||
Window dummy, child;
|
Window dummy, child;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
@ -83,6 +83,12 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
XQueryPointer(globalconf.display, RootWindow(globalconf.display, phys_screen),
|
XQueryPointer(globalconf.display, RootWindow(globalconf.display, phys_screen),
|
||||||
&dummy, &child, &x, &y, &di, &di, &dui);
|
&dummy, &child, &x, &y, &di, &di, &dui);
|
||||||
|
if((newscreen = get_screen_bycoord(x, y)) != screen)
|
||||||
|
{
|
||||||
|
move_client_to_screen(c, newscreen, True);
|
||||||
|
globalconf.screens[screen].need_arrange = True;
|
||||||
|
globalconf.screens[newscreen].need_arrange = True;
|
||||||
|
}
|
||||||
if((target = get_client_bywin(globalconf.clients, child)) && target != c)
|
if((target = get_client_bywin(globalconf.clients, child)) && target != c)
|
||||||
{
|
{
|
||||||
client_list_swap(&globalconf.clients, c, target);
|
client_list_swap(&globalconf.clients, c, target);
|
||||||
|
|
Loading…
Reference in New Issue