summaryrefslogtreecommitdiffstats
path: root/src/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorDarrell Anderson <[email protected]>2012-10-19 22:51:19 -0500
committerDarrell Anderson <[email protected]>2012-10-19 22:51:19 -0500
commite230650065e8fd82816319f8fa1c63507027d022 (patch)
tree1bbb6c6e5ec8b92bd94f34eee95d01a863d4c61e /src/kernel/qapplication.cpp
parent06e01077e1826d986821404d87de10399a7c1b6e (diff)
parent691129fbcb6c0f377abac61c6051700b4148efc4 (diff)
downloadtqt3-e230650065e8fd82816319f8fa1c63507027d022.tar.gz
tqt3-e230650065e8fd82816319f8fa1c63507027d022.zip
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src/kernel/qapplication.cpp')
-rw-r--r--src/kernel/qapplication.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index 3dc3db748..71b87ffe0 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -2557,6 +2557,21 @@ bool TQApplication::event( TQEvent *e )
return TQObject::event(e);
}
+#define HOVER_SENSITIVE_WIDGET_SELECT if ( widget->inherits("TQPushButton") \
+ || widget->inherits("TQComboBox") \
+ || widget->inherits("TQSpinWidget") \
+ || widget->inherits("TQCheckBox") \
+ || widget->inherits("TQRadioButton") \
+ || widget->inherits("TQToolButton") \
+ || widget->inherits("TQSlider") \
+ || widget->inherits("TQScrollBar") \
+ || widget->inherits("TQTabBar") \
+ || widget->inherits("TQDockWindowHandle") \
+ || widget->inherits("TQSplitterHandle") )
+
+#define FOCUS_SENSITIVE_WIDGET_SELECT if ( widget->inherits("TQLineEdit") )
+#define FOCUS_SENSITIVE_PARENT_WIDGET_SELECT if ( widget->parentWidget() && widget->parentWidget()->inherits("TQSpinWidget") )
+
/*!\internal
Helper function called by notify()
@@ -2579,10 +2594,28 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
TQWidget *widget = (TQWidget*)receiver;
// toggle HasMouse widget state on enter and leave
- if ( e->type() == TQEvent::Enter || e->type() == TQEvent::DragEnter )
+ if ( e->type() == TQEvent::Enter || e->type() == TQEvent::DragEnter ) {
widget->setWState( WState_HasMouse );
- else if ( e->type() == TQEvent::Leave || e->type() == TQEvent::DragLeave )
+ HOVER_SENSITIVE_WIDGET_SELECT {
+ widget->repaint(false);
+ }
+ }
+ else if ( e->type() == TQEvent::Leave || e->type() == TQEvent::DragLeave ) {
widget->clearWState( WState_HasMouse );
+ HOVER_SENSITIVE_WIDGET_SELECT {
+ widget->repaint(false);
+ }
+ }
+
+ // repaint information entry widgets on focus set/unset
+ if ( e->type() == TQEvent::FocusIn || e->type() == TQEvent::FocusOut ) {
+ FOCUS_SENSITIVE_WIDGET_SELECT {
+ widget->repaint(false);
+ }
+ FOCUS_SENSITIVE_PARENT_WIDGET_SELECT {
+ widget->parentWidget()->repaint(false);
+ }
+ }
// throw away any mouse-tracking-only mouse events
if ( e->type() == TQEvent::MouseMove &&