constrain_window(struct ws_win *win, struct swm_region *r, int resizable)
{
if (win->g.x + win->g.w > r->g.x + r->g.w - border_width) {
constrain_window(struct ws_win *win, struct swm_region *r, int resizable)
{
if (win->g.x + win->g.w > r->g.x + r->g.w - border_width) {
win->g.w = r->g.x + r->g.w - win->g.x - border_width;
else
win->g.x = r->g.x + r->g.w - win->g.w - border_width;
}
win->g.w = r->g.x + r->g.w - win->g.x - border_width;
else
win->g.x = r->g.x + r->g.w - win->g.w - border_width;
}
shape = (left) ? XC_bottom_left_corner : XC_bottom_right_corner;
cursor = XCreateFontCursor(display, shape);
if (XGrabPointer(display, win->id, False, MOUSEMASK, GrabModeAsync,
GrabModeAsync, None, cursor, CurrentTime) != GrabSuccess) {
shape = (left) ? XC_bottom_left_corner : XC_bottom_right_corner;
cursor = XCreateFontCursor(display, shape);
if (XGrabPointer(display, win->id, False, MOUSEMASK, GrabModeAsync,
GrabModeAsync, None, cursor, CurrentTime) != GrabSuccess) {
- if(asprintf(&optsub, "%.*s", wordlen, cp) ==
+ if (asprintf(&optsub, "%.*s", wordlen, cp) ==
-1) {
warnx("%s: line %zd: unable to allocate"
"memory for selector", filename,
lineno);
-1) {
warnx("%s: line %zd: unable to allocate"
"memory for selector", filename,
lineno);
ev->window, ev->mode, ev->detail, ev->root, ev->subwindow,
ev->same_screen, ev->focus, ev->state);
ev->window, ev->mode, ev->detail, ev->root, ev->subwindow,
ev->same_screen, ev->focus, ev->state);
- DNPRINTF(SWM_D_EVENT, "propertynotify: window: %lu\n",
- ev->window);
+ DNPRINTF(SWM_D_EVENT, "propertynotify: window: %lu atom:%s\n",
+ ev->window, XGetAtomName(display, ev->atom));