#include "session.h"
#include "event.h"
#include "grab.h"
+#include "prompt.h"
#include "focus.h"
#include "stacking.h"
#include "openbox.h"
stacking_set_list();
}
-void client_manage(Window window)
+void client_manage(Window window, ObPrompt *prompt)
{
ObClient *self;
XSetWindowAttributes attrib_set;
self = g_new0(ObClient, 1);
self->obwin.type = OB_WINDOW_CLASS_CLIENT;
self->window = window;
+ self->prompt = prompt;
/* non-zero defaults */
self->wmstate = WithdrawnState; /* make sure it gets updated first time */
/* specify that if we exit, the window should not be destroyed and
should be reparented back to root automatically */
- XChangeSaveSet(obt_display, window, SetModeInsert);
+ if (!self->prompt)
+ XChangeSaveSet(obt_display, window, SetModeInsert);
/* create the decoration frame for the client window */
self->frame = frame_new(self);
mouse_grab_for_client(self, FALSE);
/* remove the window from our save set */
- XChangeSaveSet(obt_display, self->window, SetModeDelete);
+ if (!self->prompt)
+ XChangeSaveSet(obt_display, self->window, SetModeDelete);
/* update the focus lists */
focus_order_remove(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)