summaryrefslogtreecommitdiffstats
path: root/src/kernel/qapplication.cpp
diff options
context:
space:
mode:
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 &&