From: Mikko Rasa Date: Mon, 23 Sep 2019 18:26:00 +0000 (+0300) Subject: Adjust a pointer check in Container X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=ecc3ffc4433f14534560bbe51441e7f02e42a0c1;p=libs%2Fgltk.git Adjust a pointer check in Container This is semantically equivalent but more intuitive and more tolerant to mistakes. --- diff --git a/source/container.cpp b/source/container.cpp index 53eeaa7..e99d993 100644 --- a/source/container.cpp +++ b/source/container.cpp @@ -224,7 +224,7 @@ void Container::pointer_motion(int x, int y) { Widget *child = get_pointer_target(x, y, false); if(!pointer_grabbed) - set_pointer_focus((!click_focus || child->get_geometry().is_inside(x, y)) ? child : 0); + set_pointer_focus((child && child->get_geometry().is_inside(x, y)) ? child : 0); if(child) {