Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
78be8201
Commit
78be8201
authored
Aug 19, 2015
by
Hisham Muhammad
Browse files
Add expand/collapse on additional clicks!
parent
b0036369
Changes
4
Hide whitespace changes
Inline
Side-by-side
Action.c
View file @
78be8201
...
...
@@ -530,6 +530,7 @@ void Action_setBindings(Htop_Action* keys) {
keys
[
'a'
]
=
actionSetAffinity
;
keys
[
KEY_F
(
9
)]
=
actionKill
;
keys
[
'k'
]
=
actionKill
;
keys
[
KEY_RECLICK
]
=
actionExpandOrCollapse
;
keys
[
'+'
]
=
actionExpandOrCollapse
;
keys
[
'='
]
=
actionExpandOrCollapse
;
keys
[
'-'
]
=
actionExpandOrCollapse
;
...
...
CRT.c
View file @
78be8201
...
...
@@ -31,6 +31,7 @@ in the source distribution for its full text.
#define KEY_WHEELUP KEY_F(20)
#define KEY_WHEELDOWN KEY_F(21)
#define KEY_RECLICK KEY_F(22)
//#link curses
...
...
CRT.h
View file @
78be8201
...
...
@@ -22,6 +22,7 @@ in the source distribution for its full text.
#define KEY_WHEELUP KEY_F(20)
#define KEY_WHEELDOWN KEY_F(21)
#define KEY_RECLICK KEY_F(22)
//#link curses
...
...
ScreenManager.c
View file @
78be8201
...
...
@@ -208,12 +208,16 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
ch
=
EVENT_HEADER_CLICK
(
mevent
.
x
-
panel
->
x
);
break
;
}
else
if
(
mevent
.
y
>
panel
->
y
&&
mevent
.
y
<=
panel
->
y
+
panel
->
h
)
{
ch
=
KEY_MOUSE
;
if
(
panel
==
panelFocus
||
this
->
allowFocusChange
)
{
focus
=
i
;
panelFocus
=
setCurrentPanel
(
panel
);
Object
*
oldSelection
=
Panel_getSelected
(
panel
);
Panel_setSelected
(
panel
,
mevent
.
y
-
panel
->
y
+
panel
->
scrollV
-
1
);
if
(
Panel_getSelected
(
panel
)
==
oldSelection
)
{
ch
=
KEY_RECLICK
;
}
}
ch
=
KEY_MOUSE
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
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