summaryrefslogtreecommitdiff
path: root/openbox/client.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-06 22:49:55 -0500
committerDana Jansens <danakj@orodu.net>2008-02-07 02:14:44 -0500
commitf5c2d6d3798fdc70c8bbc5d8205cf20e2b2a7cd3 (patch)
tree278cf4a1843baa2c79c6fd2ee10110722c9845c6 /openbox/client.c
parent84f1f2be1271bd5f5cf8f92d1cc3a56851c688e8 (diff)
Make ObPrompt windows get managed as clients, and make them able to reconfigure as well.
Diffstat (limited to 'openbox/client.c')
-rw-r--r--openbox/client.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 6534e1b3..3867c39e 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -29,6 +29,7 @@
#include "session.h"
#include "event.h"
#include "grab.h"
+#include "prompt.h"
#include "focus.h"
#include "stacking.h"
#include "openbox.h"
@@ -174,7 +175,7 @@ void client_set_list(void)
stacking_set_list();
}
-void client_manage(Window window)
+void client_manage(Window window, ObPrompt *prompt)
{
ObClient *self;
XSetWindowAttributes attrib_set;
@@ -199,6 +200,7 @@ void client_manage(Window window)
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 */
@@ -218,7 +220,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(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);
@@ -617,7 +620,8 @@ void client_unmanage(ObClient *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);
@@ -3250,6 +3254,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)