Change input.c to handle new actions
This commit is contained in:
parent
6c61f3e5e2
commit
b66f8f362d
16
src/input.c
16
src/input.c
@ -1,5 +1,6 @@
|
|||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "menu.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "queues.h"
|
#include "queues.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
@ -41,7 +42,12 @@ void input_handle_click(unsigned int button, bool button_down, int mouse_x, int
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (act == MOUSE_DO_ACTION || act == MOUSE_CLOSE_CURRENT) {
|
if (act == MOUSE_CONTEXT_ALL) {
|
||||||
|
context_menu();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (act == MOUSE_DO_ACTION || act == MOUSE_CLOSE_CURRENT || act == MOUSE_CONTEXT) {
|
||||||
int y = settings.separator_height;
|
int y = settings.separator_height;
|
||||||
struct notification *n = NULL;
|
struct notification *n = NULL;
|
||||||
int first = true;
|
int first = true;
|
||||||
@ -59,8 +65,14 @@ void input_handle_click(unsigned int button, bool button_down, int mouse_x, int
|
|||||||
if (n) {
|
if (n) {
|
||||||
if (act == MOUSE_CLOSE_CURRENT) {
|
if (act == MOUSE_CLOSE_CURRENT) {
|
||||||
n->marked_for_closure = REASON_USER;
|
n->marked_for_closure = REASON_USER;
|
||||||
} else {
|
} else if (act == MOUSE_DO_ACTION) {
|
||||||
notification_do_action(n);
|
notification_do_action(n);
|
||||||
|
} else {
|
||||||
|
GList *notifications = NULL;
|
||||||
|
notifications = g_list_append(notifications, n);
|
||||||
|
notification_lock(n);
|
||||||
|
|
||||||
|
context_menu_for(notifications);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user