fix(Tray): click behaviour

This commit is contained in:
Alex 2019-06-11 17:53:16 +02:00
parent c2e9ed6091
commit ec75be0bc3
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#include "modules/sni/item.hpp"
#include <glibmm/main.h>
#include <spdlog/spdlog.h>
#include "modules/sni/item.hpp"
template <>
struct fmt::formatter<Glib::ustring> : formatter<std::string> {
@ -334,7 +334,7 @@ void Item::makeMenu(GdkEventButton* const& ev) {
bool Item::handleClick(GdkEventButton* const& ev) {
auto parameters = Glib::VariantContainerBase::create_tuple(
{Glib::Variant<int>::create(ev->x), Glib::Variant<int>::create(ev->y)});
if ((ev->button == 1 && item_is_menu) || ev->button == 3) {
if ((ev->button == 1 && (item_is_menu || !menu.empty())) || ev->button == 3) {
makeMenu(ev);
if (gtk_menu != nullptr) {
#if GTK_CHECK_VERSION(3, 22, 0)