]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/container.cpp
Allow custom tooltips at empty areas of a Root
[libs/gltk.git] / source / container.cpp
index a755644bab6283bf3b6f7eb575befba32a3003d6..a46492d4ea3a1b7bb5e464952d7db846db4633c8 100644 (file)
@@ -67,7 +67,9 @@ Widget *Container::get_descendant_at(int x, int y)
        if(Container *cont=dynamic_cast<Container *>(wdg))
        {
                const Geometry &cgeom=wdg->get_geometry();
-               return cont->get_descendant_at(x-cgeom.x, y-cgeom.y);
+               Widget *wdg2=cont->get_descendant_at(x-cgeom.x, y-cgeom.y);
+               if(wdg2)
+                       return wdg2;
        }
        return wdg;
 }