X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=inline;f=openbox%2Fclient.c;h=1eba49f82e3c9c9c929b8bb075a21b8f3310e61b;hb=457fdc5ccbb65dc4b5e6cd972e048e3218527b91;hp=371eb08746d4b6b172e3353294d2646c950fb4db;hpb=974e88581fcab366579d5dd682713aa6deb752a9;p=chaz%2Fopenbox diff --git a/openbox/client.c b/openbox/client.c index 371eb087..1eba49f8 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -32,6 +32,7 @@ #include "session.h" #include "event.h" #include "grab.h" +#include "prompt.h" #include "focus.h" #include "stacking.h" #include "openbox.h" @@ -211,13 +212,13 @@ void client_manage_all(void) if (attrib.override_redirect) continue; if (attrib.map_state != IsUnmapped) - client_manage(children[i]); + client_manage(children[i], NULL); } } XFree(children); } -void client_manage(Window window) +void client_manage(Window window, ObPrompt *prompt) { ObClient *self; XEvent e; @@ -280,6 +281,7 @@ void client_manage(Window window) self = g_new0(ObClient, 1); self->obwin.type = Window_Client; self->window = window; + self->prompt = prompt; /* non-zero defaults */ self->wmstate = WithdrawnState; /* make sure it gets updated first time */ @@ -299,7 +301,8 @@ void client_manage(Window window) /* specify that if we exit, the window should not be destroyed and should be reparented back to root automatically */ - XChangeSaveSet(ob_display, window, SetModeInsert); + if (!self->prompt) + XChangeSaveSet(ob_display, window, SetModeInsert); /* create the decoration frame for the client window */ self->frame = frame_new(self); @@ -700,7 +703,8 @@ void client_unmanage(ObClient *self) mouse_grab_for_client(self, FALSE); /* remove the window from our save set */ - XChangeSaveSet(ob_display, self->window, SetModeDelete); + if (!self->prompt) + XChangeSaveSet(ob_display, self->window, SetModeDelete); /* update the focus lists */ focus_order_remove(self); @@ -3342,6 +3346,11 @@ void client_close(ObClient *self) { if (!(self->functions & OB_CLIENT_FUNC_CLOSE)) return; + if (self->prompt) { + prompt_hide(self); + return; + } + /* in the case that the client provides no means to requesting that it close, we just kill it */ if (!self->delete_window)