]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/combox.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / combox.C
index 3cbebf864d77a45c67d2aeea47754dafd32436ed..188b5cff716b80992f26489497ffaa5fcb2c233a 100644 (file)
@@ -358,17 +358,31 @@ void Combox::hide(int who)
 
 void Combox::activate()
 {
-       if (browser) fl_activate_object(browser);
-       if (button) fl_activate_object(button);
-       if (label) fl_activate_object(label);
+       if (browser)
+               fl_activate_object(browser);
+       if (button) {
+               fl_activate_object(button);
+               fl_set_object_lcol(button, FL_BLACK);
+       }
+       if (label) {
+               fl_activate_object(label);
+               fl_set_object_lcol(label, FL_BLACK);
+       }
 }
 
 
 void Combox::deactivate()
 {
-       if (browser) fl_deactivate_object(browser);
-       if (button) fl_deactivate_object(button);
-       if (label) fl_deactivate_object(label);
+       if (browser)
+               fl_deactivate_object(browser);
+       if (button) {
+               fl_deactivate_object(button);
+               fl_set_object_lcol(button, FL_INACTIVE);
+       }
+       if (label) {
+               fl_deactivate_object(label);
+               fl_set_object_lcol(label, FL_INACTIVE);
+       }
 }
 
 
@@ -423,8 +437,7 @@ int Combox::peek_event(FL_FORM * form, void * xev)
        FL_OBJECT * ob = static_cast<FL_OBJECT *>(form->u_vdata);
        Combox * combo = static_cast<Combox*>(ob->u_vdata);
        
-       // I don't know why belowmouse does not work, but it doesn't. (Asger)
-       // Are we sure? Please verify. (Lgb)
+       // below mouse does not work like we need it 
        if (static_cast<XEvent *>(xev)->type == ButtonPress && (
                static_cast<XEvent *>(xev)->xbutton.x - ob->x < 0 ||
                static_cast<XEvent *>(xev)->xbutton.x - ob->x > ob->w ||