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-14 14:24:07 -0500
commit457fdc5ccbb65dc4b5e6cd972e048e3218527b91 (patch)
tree261d962a4340b9a704e0a9cf6ba1d5ba06c5d6b7 /openbox/client.c
parent974e88581fcab366579d5dd682713aa6deb752a9 (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.c17
1 files changed, 13 insertions, 4 deletions
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)