fix: Handle mouse button click/scroll events
This commit is contained in:
parent
8af7388c93
commit
c687b07cd0
10 changed files with 311 additions and 156 deletions
include/modules
|
@ -206,14 +206,18 @@ namespace modules {
|
|||
return true;
|
||||
}
|
||||
|
||||
// bool handle_command(string cmd) {
|
||||
// if (cmd.find(EVENT_CLICK) == string::npos || cmd.length() < strlen(EVENT_CLICK))
|
||||
// return false;
|
||||
//
|
||||
// m_ipc->send_command("workspace number " + cmd.substr(strlen(EVENT_CLICK)));
|
||||
//
|
||||
// return true;
|
||||
// }
|
||||
bool handle_event(string cmd) {
|
||||
if (cmd.find(EVENT_CLICK) == string::npos || cmd.length() < strlen(EVENT_CLICK))
|
||||
return false;
|
||||
|
||||
m_ipc->send_command("workspace number " + cmd.substr(strlen(EVENT_CLICK)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool receive_events() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
static constexpr auto DEFAULT_WS_ICON = "workspace_icon-default";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue