Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
befddfcd
Commit
befddfcd
authored
Aug 18, 2020
by
Luc Dufresne
Committed by
Tomaz Canabrava
Sep 15, 2020
Browse files
BUG : 364098 - add focus following mouse feature
parent
c8bd9a81
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/settings/GeneralSettings.ui
View file @
befddfcd
...
...
@@ -49,7 +49,7 @@
<property
name=
"spacing"
>
<number>
6
</number>
</property>
<item
row=
"1
1
"
column=
"1"
>
<item
row=
"1
2
"
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=
"1
3
"
column=
"0"
alignment=
"Qt::AlignRight"
>
<item
row=
"1
4
"
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=
"1
3
"
column=
"1"
>
<item
row=
"1
4
"
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=
"1
2
"
column=
"1"
>
<item
row=
"1
3
"
column=
"1"
>
<spacer>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
...
...
src/settings/konsole.kcfg
View file @
befddfcd
...
...
@@ -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>
...
...
src/widgets/TerminalDisplay.cpp
View file @
befddfcd
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment