]> Dogcows Code - chaz/openbox/blobdiff - openbox/prompt.c
use the hover and press button colors (this was a bug)
[chaz/openbox] / openbox / prompt.c
index 080dc9a8b4d54632af2c8ad7e00648d9d21df66e..f391331c204c15366b9684174e3409b58427ea26 100644 (file)
@@ -23,6 +23,7 @@
 #include "client.h"
 #include "prop.h"
 #include "modkeys.h"
+#include "event.h"
 #include "gettext.h"
 
 static GList *prompt_list = NULL;
@@ -47,8 +48,8 @@ void prompt_startup(gboolean reconfig)
     prompt_a_press = RrAppearanceCopy(ob_rr_theme->a_focused_pressed_close);
 
     c_button = prompt_a_button->texture[0].data.mask.color;
-    c_focus = prompt_a_button->texture[0].data.mask.color;
-    c_press = prompt_a_button->texture[0].data.mask.color;
+    c_focus = prompt_a_focus->texture[0].data.mask.color;
+    c_press = prompt_a_press->texture[0].data.mask.color;
 
     RrAppearanceRemoveTextures(prompt_a_button);
     RrAppearanceRemoveTextures(prompt_a_focus);
@@ -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;
This page took 0.020897 seconds and 4 git commands to generate.