X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.c;h=8634707c19e5bc0a0d03534ee58ed15da97eef33;hb=e27680e4205f5be210cd52660f495e67623e6260;hp=2e432dbebe2f2613e99f12937a8ef348739ed4a2;hpb=a0d14c7d4468b6348d906a68bb5dfe3acce0ad64;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 2e432dbe..8634707c 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -203,6 +203,7 @@ void client_manage(Window window, ObPrompt *prompt) Time launch_time; guint32 user_time; gboolean obplaced; + gulong ignore_start; ob_debug("Managing window: 0x%lx", window); @@ -468,19 +469,13 @@ void client_manage(Window window, ObPrompt *prompt) /* grab mouse bindings before showing the window */ mouse_grab_for_client(self, TRUE); + if (!config_focus_under_mouse) + ignore_start = event_start_ignore_all_enters(); + /* this has to happen before we try focus the window, but we want it to happen after the client's stacking has been determined or it looks bad */ - { - gulong ignore_start; - if (!config_focus_under_mouse) - ignore_start = event_start_ignore_all_enters(); - - client_show(self); - - if (!config_focus_under_mouse) - event_end_ignore_all_enters(ignore_start); - } + client_show(self); /* activate/hilight/raise the window */ if (try_activate) { @@ -508,6 +503,9 @@ void client_manage(Window window, ObPrompt *prompt) stacking_raise(CLIENT_AS_WINDOW(self)); } + if (!config_focus_under_mouse) + event_end_ignore_all_enters(ignore_start); + /* add to client list/map */ client_list = g_list_append(client_list, self); window_add(&self->window, CLIENT_AS_WINDOW(self)); @@ -2930,10 +2928,11 @@ void client_try_configure(ObClient *self, gint *x, gint *y, gint *w, gint *h, /* cap any X windows at the size of an unsigned short */ *w = MIN(*w, - G_MAXUSHORT - self->frame->size.left - self->frame->size.right); + (gint)G_MAXUSHORT + - self->frame->size.left - self->frame->size.right); *h = MIN(*h, - G_MAXUSHORT - self->frame->size.top - self->frame->size.bottom); - + (gint)G_MAXUSHORT + - self->frame->size.top - self->frame->size.bottom); /* gets the frame's position */ frame_client_gravity(self->frame, x, y);