Commit befddfcd authored by Luc Dufresne's avatar Luc Dufresne Committed by Tomaz Canabrava
Browse files

BUG : 364098 - add focus following mouse feature

parent c8bd9a81
......@@ -49,7 +49,7 @@
<property name="spacing">
<number>6</number>
</property>
<item row="11" column="1">
<item row="12" column="1">
<widget class="QCheckBox" name="kcfg_SearchReverseSearch">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
......@@ -78,7 +78,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<widget class="QCheckBox" name="kcfg_SearchCaseSensitive">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
......@@ -159,7 +159,14 @@
</property>
</widget>
</item>
<item row="10" column="1">
<item row="7" column="1">
<widget class="QCheckBox" name="kcfg_FocusFollowsMouse">
<property name="text">
<string>Focus terminals when the mouse pointer is moved over them</string>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QCheckBox" name="kcfg_SearchHighlightMatches">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
......@@ -185,21 +192,21 @@
</property>
</widget>
</item>
<item row="13" column="0" alignment="Qt::AlignRight">
<item row="14" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Notifications:</string>
</property>
</widget>
</item>
<item row="8" column="0" alignment="Qt::AlignRight">
<item row="9" column="0" alignment="Qt::AlignRight">
<widget class="QLabel" name="label_2">
<property name="text">
<string comment="@item:intext Search options">Search:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<item row="8" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -215,7 +222,7 @@
</property>
</spacer>
</item>
<item row="13" column="1">
<item row="14" column="1">
<layout class="QHBoxLayout" stretch="0,1">
<property name="spacing">
<number>0</number>
......@@ -261,7 +268,7 @@
</property>
</widget>
</item>
<item row="9" column="1">
<item row="10" column="1">
<widget class="QCheckBox" name="kcfg_SearchRegExpression">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
......@@ -274,7 +281,7 @@
</property>
</widget>
</item>
<item row="12" column="1">
<item row="13" column="1">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
......
......@@ -14,6 +14,10 @@
<label>Remove window titlebar and frame</label>
<default>false</default>
</entry>
<entry name="FocusFollowsMouse" type="Bool">
<label>Focus terminals when the mouse pointer is moved over them</label>
<default>false</default>
</entry>
<entry name="ShowWindowTitleOnTitleBar" type="Bool">
<label>Show window title on the titlebar</label>
<tooltip>Show window title set by escape sequence on the titlebar</tooltip>
......
......@@ -2407,6 +2407,10 @@ void TerminalDisplay::mouseMoveEvent(QMouseEvent* ev)
int charLine = 0;
int charColumn = 0;
if (!hasFocus() && KonsoleSettings::focusFollowsMouse()) {
setFocus();
}
getCharacterPosition(ev->pos(), charLine, charColumn, !_usesMouseTracking);
processFilters();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment