add the left/right/top/bottom direction arrows and use them for resizing those ways
This commit is contained in:
parent
4b421dc811
commit
43139ed373
3 changed files with 13 additions and 5 deletions
|
@ -95,19 +95,19 @@ void moveresize_start(Client *c, int x, int y, guint b, guint32 cnr)
|
||||||
if (corner == prop_atoms.net_wm_moveresize_size_topleft)
|
if (corner == prop_atoms.net_wm_moveresize_size_topleft)
|
||||||
cur = ob_cursors.tl;
|
cur = ob_cursors.tl;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_top)
|
else if (corner == prop_atoms.net_wm_moveresize_size_top)
|
||||||
cur = ob_cursors.tl;
|
cur = ob_cursors.t;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_topright)
|
else if (corner == prop_atoms.net_wm_moveresize_size_topright)
|
||||||
cur = ob_cursors.tr;
|
cur = ob_cursors.tr;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_right)
|
else if (corner == prop_atoms.net_wm_moveresize_size_right)
|
||||||
cur = ob_cursors.tr;
|
cur = ob_cursors.r;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_bottomright)
|
else if (corner == prop_atoms.net_wm_moveresize_size_bottomright)
|
||||||
cur = ob_cursors.br;
|
cur = ob_cursors.br;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_bottom)
|
else if (corner == prop_atoms.net_wm_moveresize_size_bottom)
|
||||||
cur = ob_cursors.br;
|
cur = ob_cursors.b;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_bottomleft)
|
else if (corner == prop_atoms.net_wm_moveresize_size_bottomleft)
|
||||||
cur = ob_cursors.bl;
|
cur = ob_cursors.bl;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_left)
|
else if (corner == prop_atoms.net_wm_moveresize_size_left)
|
||||||
cur = ob_cursors.bl;
|
cur = ob_cursors.l;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_size_keyboard)
|
else if (corner == prop_atoms.net_wm_moveresize_size_keyboard)
|
||||||
cur = ob_cursors.br;
|
cur = ob_cursors.br;
|
||||||
else if (corner == prop_atoms.net_wm_moveresize_move)
|
else if (corner == prop_atoms.net_wm_moveresize_move)
|
||||||
|
@ -183,7 +183,7 @@ void moveresize_event(XEvent *e)
|
||||||
button = e->xbutton.button; /* this will end it now */
|
button = e->xbutton.button; /* this will end it now */
|
||||||
}
|
}
|
||||||
} else if (e->type == ButtonRelease) {
|
} else if (e->type == ButtonRelease) {
|
||||||
if (e->xbutton.button == button) {
|
if (!button || e->xbutton.button == button) {
|
||||||
end_moveresize(FALSE);
|
end_moveresize(FALSE);
|
||||||
}
|
}
|
||||||
} else if (e->type == MotionNotify) {
|
} else if (e->type == MotionNotify) {
|
||||||
|
|
|
@ -151,6 +151,10 @@ int main(int argc, char **argv)
|
||||||
ob_cursors.tr = XCreateFontCursor(ob_display, XC_top_right_corner);
|
ob_cursors.tr = XCreateFontCursor(ob_display, XC_top_right_corner);
|
||||||
ob_cursors.bl = XCreateFontCursor(ob_display, XC_bottom_left_corner);
|
ob_cursors.bl = XCreateFontCursor(ob_display, XC_bottom_left_corner);
|
||||||
ob_cursors.br = XCreateFontCursor(ob_display, XC_bottom_right_corner);
|
ob_cursors.br = XCreateFontCursor(ob_display, XC_bottom_right_corner);
|
||||||
|
ob_cursors.t = XCreateFontCursor(ob_display, XC_top_side);
|
||||||
|
ob_cursors.r = XCreateFontCursor(ob_display, XC_right_side);
|
||||||
|
ob_cursors.b = XCreateFontCursor(ob_display, XC_bottom_side);
|
||||||
|
ob_cursors.l = XCreateFontCursor(ob_display, XC_left_side);
|
||||||
|
|
||||||
prop_startup(); /* get atoms values for the display */
|
prop_startup(); /* get atoms values for the display */
|
||||||
extensions_query_all(); /* find which extensions are present */
|
extensions_query_all(); /* find which extensions are present */
|
||||||
|
|
|
@ -41,6 +41,10 @@ typedef struct Cursors {
|
||||||
Cursor br;
|
Cursor br;
|
||||||
Cursor tl;
|
Cursor tl;
|
||||||
Cursor tr;
|
Cursor tr;
|
||||||
|
Cursor t;
|
||||||
|
Cursor r;
|
||||||
|
Cursor b;
|
||||||
|
Cursor l;
|
||||||
} Cursors;
|
} Cursors;
|
||||||
extern Cursors ob_cursors;
|
extern Cursors ob_cursors;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue