+ LOG("This window is of type dock\n");
+ Output *output = get_output_containing(geom->x, geom->y);
+ if (output != NULL) {
+ DLOG("Starting search at output %s\n", output->name);
+ search_at = output->con;
+ }
+
+ /* find out the desired position of this dock window */
+ if (cwindow->reserved.top > 0 && cwindow->reserved.bottom == 0) {
+ DLOG("Top dock client\n");
+ cwindow->dock = W_DOCK_TOP;
+ } else if (cwindow->reserved.top == 0 && cwindow->reserved.bottom > 0) {
+ DLOG("Bottom dock client\n");
+ cwindow->dock = W_DOCK_BOTTOM;
+ } else {
+ DLOG("Ignoring invalid reserved edges (_NET_WM_STRUT_PARTIAL), using position as fallback:\n");
+ if (geom->y < (search_at->rect.height / 2)) {
+ DLOG("geom->y = %d < rect.height / 2 = %d, it is a top dock client\n",
+ geom->y, (search_at->rect.height / 2));
+ cwindow->dock = W_DOCK_TOP;
+ } else {
+ DLOG("geom->y = %d >= rect.height / 2 = %d, it is a bottom dock client\n",
+ geom->y, (search_at->rect.height / 2));
+ cwindow->dock = W_DOCK_BOTTOM;
+ }
+ }