From 2bb83523cd72c030aaa37c0be2f488e395fbc886 Mon Sep 17 00:00:00 2001 From: Tametomo Date: Thu, 21 May 2009 14:18:15 -0600 Subject: Make sure the tabbed area gets focus set on it when one of its tabs is pressed by the mouse. Signed-off-by: Tametomo --- src/gui/widgets/tabbedarea.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 970a5cb1..5e0807e6 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -158,6 +158,9 @@ void TabbedArea::logic() void TabbedArea::mousePressed(gcn::MouseEvent &mouseEvent) { + if (mouseEvent.isConsumed()) + return; + if (mouseEvent.getButton() == gcn::MouseEvent::LEFT) { gcn::Widget *widget = mTabContainer->getWidgetAt(mouseEvent.getX(), @@ -165,7 +168,10 @@ void TabbedArea::mousePressed(gcn::MouseEvent &mouseEvent) gcn::Tab *tab = dynamic_cast(widget); if (tab) + { setSelectedTab(tab); + requestFocus(); + } } } -- cgit v1.2.3-70-g09d2