forked from speedie/spmenu
Rename selecthover to outputhover and add selecthover function.
This commit is contained in:
parent
0ec1c73053
commit
0f69bd63b1
15
libs/arg.c
15
libs/arg.c
|
@ -623,7 +623,7 @@ void switchmode(Arg *arg) {
|
|||
* The only difference is "selectitem" was replaced with "mouseitem" and tx.text output
|
||||
* was removed.
|
||||
*/
|
||||
void selecthover(Arg *arg) {
|
||||
void outputhover(Arg *arg) {
|
||||
char *selection;
|
||||
|
||||
if (printindex && mouseitem && arg->i) {
|
||||
|
@ -650,6 +650,19 @@ void selecthover(Arg *arg) {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
void selecthover(Arg *arg) {
|
||||
if (selecteditem != mouseitem) {
|
||||
selecteditem = mouseitem;
|
||||
} else {
|
||||
selecteditem = mouseitem;
|
||||
outputhover(arg);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
drawmenu();
|
||||
}
|
||||
|
||||
void markhover(Arg *arg) {
|
||||
if (!mark) return;
|
||||
if (mouseitem && is_selected(mouseitem->index)) {
|
||||
|
|
|
@ -77,4 +77,5 @@ static void toggleimg(Arg *arg);
|
|||
|
||||
/* hover */
|
||||
static void selecthover(Arg *arg);
|
||||
static void outputhover(Arg *arg);
|
||||
static void markhover(Arg *arg);
|
||||
|
|
|
@ -395,6 +395,7 @@ static FuncList fl[] = {
|
|||
{ "setprofile", setprofile },
|
||||
{ "setlineheight", setlineheight },
|
||||
{ "switchmode", switchmode },
|
||||
{ "outputhover", outputhover },
|
||||
{ "selecthover", selecthover },
|
||||
{ "markhover", markhover },
|
||||
{ "spawn", spawn },
|
||||
|
|
Loading…
Reference in a new issue