menu_set_update_func(combined_menu, self_update);
menu_set_cleanup_func(combined_menu, self_cleanup);
menu_set_execute_func(combined_menu, menu_execute);
+ combined_menu->warp = TRUE;
}
void client_list_combined_menu_shutdown(gboolean reconfig)
}
menu_frame_move(self, x, y);
-
XMapWindow(obt_display, self->window);
if (screen_pointer_pos(&px, &py)) {
- ObMenuEntryFrame *e = menu_entry_frame_under(px, py);
- if (e && e->frame == self)
- e->ignore_enters++;
+
+ if (self->menu->warp) {
+ x += self->area.width / 2;
+ XWarpPointer(obt_display, None, obt_root(ob_screen), 0, 0, 0, 0, x, y);
+ self->ox = px;
+ self->oy = py;
+ } else {
+ ObMenuEntryFrame *e = menu_entry_frame_under(px, py);
+ if (e && e->frame == self)
+ e->ignore_enters++;
+ }
}
+
return TRUE;
}
ungrab_keyboard();
}
+ if (self->menu->warp)
+ XWarpPointer(obt_display, None, obt_root(ob_screen), 0, 0, 0, 0, self->ox, self->oy);
+
ignore_start = event_start_ignore_all_enters();
XUnmapWindow(obt_display, self->window);
event_end_ignore_all_enters(ignore_start);