diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-02-07 01:03:05 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-02-07 02:14:44 -0500 |
| commit | 7ecfa01df81fcce628fbb354cc0c4faaddfb5c84 (patch) | |
| tree | 1fd80de196844b9c63b9faa213f3ba203aff8675 /openbox/prompt.c | |
| parent | 95ee6b103f116e34062bf5e1ad1cb8b0f23e7231 (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.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/openbox/prompt.c b/openbox/prompt.c index b1969e06..ad930e3e 100644 --- a/openbox/prompt.c +++ b/openbox/prompt.c @@ -20,6 +20,7 @@ #include "openbox.h" #include "screen.h" #include "client.h" +#include "event.h" #include "obt/display.h" #include "obt/keyboard.h" #include "obt/prop.h" @@ -330,7 +331,15 @@ void prompt_show(ObPrompt *self, ObClient *parent) XSizeHints hints; gint i; - if (self->mapped) return; + if (self->mapped) { + /* activate the prompt */ + OBT_PROP_MSG(ob_screen, self->super.window, NET_ACTIVE_WINDOW, + 1, /* from an application.. */ + event_curtime, + 0, + 0, 0); + return; + } /* set the focused button (if not found then the first button is used) */ self->focus = &self->button[0]; @@ -417,7 +426,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; |
