inline void client_action_end(union ActionData *data)
{
if (config_focus_follow)
- if (data->any.context != OB_FRAME_CONTEXT_CLIENT && !data->any.button)
- grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+ if (data->any.context != OB_FRAME_CONTEXT_CLIENT) {
+ if (!data->any.button) {
+ grab_pointer(FALSE, FALSE, OB_CURSOR_NONE);
+ } else {
+ ObClient *c;
+
+ /* usually this is sorta redundant, but with a press action
+ that moves windows our from under the cursor, the enter
+ event will come as a GrabNotify which is ignored, so this
+ makes a fake enter event
+ */
+ if ((c = client_under_pointer()))
+ event_enter_client(c);
+ }
+ }
}
typedef struct
{
if (data->client.any.c) {
if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
- data->any.context != OB_FRAME_CONTEXT_CLIENT)
+ (data->any.context != OB_FRAME_CONTEXT_CLIENT &&
+ data->any.context != OB_FRAME_CONTEXT_FRAME))
{
/* if using focus_delay, stop the timer now so that focus doesn't
go moving on us */
{
if (data->client.any.c) {
if (!data->any.button || client_mouse_focusable(data->client.any.c) ||
- data->any.context != OB_FRAME_CONTEXT_CLIENT)
+ (data->any.context != OB_FRAME_CONTEXT_CLIENT &&
+ data->any.context != OB_FRAME_CONTEXT_FRAME))
{
/* if using focus_delay, stop the timer now so that focus doesn't
go moving on us */
/* it's not set to skip the taskbar (unless it is a type that would be
expected to set this hint */
ok = ok && ((ft->type == OB_CLIENT_TYPE_DOCK ||
+ ft->type == OB_CLIENT_TYPE_DESKTOP ||
ft->type == OB_CLIENT_TYPE_TOOLBAR ||
ft->type == OB_CLIENT_TYPE_MENU ||
ft->type == OB_CLIENT_TYPE_UTILITY) ||
#define FRAME_HANDLE_Y(f) (f->innersize.top + f->client->area.height + \
f->cbwidth_y)
-/* the offsets for the titlebar elements from the edge of the titlebar.
- negative means from the right edge. */
-gint icon_off;
-gint label_off;
-gint iconify_off;
-gint desk_off;
-gint shade_off;
-gint max_off;
-gint close_off;
-
-
static void flash_done(gpointer data);
static gboolean flash_timeout(gpointer data);
if (!grab_keyboard(TRUE))
return FALSE;
} else if (action->func != istate.action->func) {
- keyboard_interactive_end(state, FALSE, action->data.any.time, FALSE);
+ keyboard_interactive_end(state, TRUE, action->data.any.time, FALSE);
}
istate.active = TRUE;
if (menu_frame_visible == NULL) {
/* no menus shown yet */
+
+ /* grab the pointer in such a way as to pass through "owner events"
+ so that we can get enter/leave notifies in the menu. */
if (!grab_pointer(TRUE, TRUE, OB_CURSOR_POINTER))
return FALSE;
if (!grab_keyboard(TRUE)) {