X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=bce1de12e7e3d0e827f78eedbbd9995ef3397757;hb=b097f84dfdf4e2548dba96aa63325cb05b5244a1;hp=283819428ba9725cd91f1d9733aaefed39df3d87;hpb=a21840cbb7912c25abc1943c08d6980da7537a6c;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 28381942..bce1de12 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -161,7 +161,13 @@ static Window event_get_window(XEvent *e) case SelectionClear: window = obt_root(ob_screen); break; + case CreateNotify: + window = e->xcreatewindow.window; + break; case MapRequest: + window = e->xmaprequest.window; + break; + case MapNotify: window = e->xmap.window; break; case UnmapNotify: @@ -515,7 +521,6 @@ static void event_process(const XEvent *ec, gpointer data) window with RevertToParent focus */ frame_adjust_focus(client->frame, FALSE); /* focus_set_client(NULL) has already been called */ - client_calc_layer(client); } else if (e->xfocus.detail == NotifyPointerRoot || e->xfocus.detail == NotifyDetailNone || @@ -625,7 +630,6 @@ static void event_process(const XEvent *ec, gpointer data) frame_adjust_focus(client->frame, FALSE); /* focus_set_client(NULL) has already been called in this section or by focus_fallback */ - client_calc_layer(client); } } else if (client) @@ -639,7 +643,7 @@ static void event_process(const XEvent *ec, gpointer data) else if (window == obt_root(ob_screen)) event_handle_root(e); else if (e->type == MapRequest) - client_manage(window); + window_manage(window); else if (e->type == MappingNotify) { /* keyboard layout changes for modifier mapping changes. reload the modifier map, and rebind all the key bindings as appropriate */ @@ -702,7 +706,7 @@ static void event_process(const XEvent *ec, gpointer data) if (e->type == ButtonPress || e->type == ButtonRelease) { /* If the button press was on some non-root window, or was physically - on the root window, the process it */ + on the root window, then process it */ if (window != obt_root(ob_screen) || e->xbutton.subwindow == None) { @@ -1625,13 +1629,13 @@ static void event_handle_dockapp(ObDockApp *app, XEvent *e) app->ignore_unmaps--; break; } - dock_remove(app, TRUE); + dock_unmanage(app, TRUE); break; case DestroyNotify: - dock_remove(app, FALSE); + dock_unmanage(app, FALSE); break; case ReparentNotify: - dock_remove(app, FALSE); + dock_unmanage(app, FALSE); break; case ConfigureNotify: dock_app_configure(app, e->xconfigure.width, e->xconfigure.height);