12 extern xcb_connection_t *
conn;
31 DLOG(
"new x = %d, y = %d\n", new_x, new_y);
35 new_x < (output->
rect.
x + 25))
42 new_y < (output->
rect.
y + 25))
53 DLOG(
"resize handler\n");
67 mask = XCB_CW_OVERRIDE_REDIRECT;
76 if (orientation ==
HORIZ) {
77 helprect.
x =
event->root_x;
78 helprect.
y = output->
rect.
y;
81 new_position =
event->root_x;
83 helprect.
x = output->
rect.
x;
84 helprect.
y =
event->root_y;
87 new_position =
event->root_y;
90 mask = XCB_CW_BACK_PIXEL;
93 mask |= XCB_CW_OVERRIDE_REDIRECT;
97 XCB_WINDOW_CLASS_INPUT_OUTPUT, (orientation ==
HORIZ ?
101 xcb_circulate_window(
conn, XCB_CIRCULATE_RAISE_LOWEST, helpwin);
109 xcb_destroy_window(
conn, helpwin);
110 xcb_destroy_window(
conn, grabwin);
114 if (orientation ==
HORIZ)
115 pixels = (new_position -
event->root_x);
116 else pixels = (new_position -
event->root_y);
118 DLOG(
"Done, pixels = %d\n", pixels);
126 double new_percent, difference;
127 double percent = first->
percent;
128 DLOG(
"percent = %f\n", percent);
130 DLOG(
"original = %d\n", original);
131 new_percent = (original + pixels) * (percent / original);
132 difference = percent - new_percent;
133 DLOG(
"difference = %f\n", difference);
134 DLOG(
"new percent = %f\n", new_percent);
138 double s_percent = second->
percent;
139 second->
percent = s_percent + difference;