summaryrefslogtreecommitdiff
path: root/openbox/prompt.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-07 01:03:05 -0500
committerDana Jansens <danakj@orodu.net>2008-02-14 14:24:36 -0500
commit972e1fc5a32e7d798fb3023012e73af20b5b03c7 (patch)
tree508ec1d9c0f3a8d2ba48c9d4303e6388f6124a49 /openbox/prompt.c
parentd714bb5708bb8b99d71803404af7af01029c5553 (diff)
if a prompt is already showing and you try show it again, then make it active. in the "kill this?" prompt use the window's original title without any of the openbox-appended-ness
Diffstat (limited to 'openbox/prompt.c')
-rw-r--r--openbox/prompt.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/openbox/prompt.c b/openbox/prompt.c
index 080dc9a8..1c7e2261 100644
--- a/openbox/prompt.c
+++ b/openbox/prompt.c
@@ -23,6 +23,7 @@
#include "client.h"
#include "prop.h"
#include "modkeys.h"
+#include "event.h"
#include "gettext.h"
static GList *prompt_list = NULL;
@@ -332,7 +333,15 @@ void prompt_show(ObPrompt *self, ObClient *parent)
XSizeHints hints;
gint i;
- if (self->mapped) return;
+ if (self->mapped) {
+ /* activate the prompt */
+ PROP_MSG(self->super.window, net_active_window,
+ 1, /* from an application.. */
+ event_curtime,
+ 0,
+ 0);
+ return;
+ }
/* set the focused button (if not found then the first button is used) */
self->focus = &self->button[0];
@@ -421,7 +430,7 @@ gboolean prompt_mouse_event(ObPrompt *self, XEvent *e)
ObPromptElement *but;
if (e->type != ButtonPress && e->type != ButtonRelease &&
- e->type != MotionNotify) return;
+ e->type != MotionNotify) return FALSE;
/* find the button */
but = NULL;