diff --git a/gb.gtk/src/CTrayIcon.cpp b/gb.gtk/src/CTrayIcon.cpp index 2880181da..fc2046d9d 100644 --- a/gb.gtk/src/CTrayIcon.cpp +++ b/gb.gtk/src/CTrayIcon.cpp @@ -89,6 +89,11 @@ static void Tray_lostFocus(gTrayIcon *sender) GB.Raise(sender->hFree,EVENT_LostFocus,0); } +static void cb_mouse_wheel(gTrayIcon *sender) +{ + GB.Raise(sender->hFree, EVENT_MouseWheel, NULL); +} + static int CTRAYICON_check(void *_object) { return TRAYICON == NULL; @@ -110,6 +115,7 @@ BEGIN_METHOD_VOID(CTRAYICON_new) TRAYICON->onDoubleClick=Tray_dblClick; TRAYICON->onEnter=Tray_enter; TRAYICON->onLeave=Tray_leave; + TRAYICON->onMouseWheel = cb_mouse_wheel; GB.Ref(THIS); //Add_Tray(_object); diff --git a/gb.gtk/src/gcontrol.cpp b/gb.gtk/src/gcontrol.cpp index b81995f20..a3540c7b7 100644 --- a/gb.gtk/src/gcontrol.cpp +++ b/gb.gtk/src/gcontrol.cpp @@ -1657,7 +1657,6 @@ void gControl::updateBorder() if (!GTK_IS_ALIGNMENT(frame)) { - fprintf(stderr, "updateBorder: !alignment\n"); refresh(); return; } diff --git a/gb.gtk/src/gtrayicon.cpp b/gb.gtk/src/gtrayicon.cpp index 71a3af484..f34c01365 100644 --- a/gb.gtk/src/gtrayicon.cpp +++ b/gb.gtk/src/gtrayicon.cpp @@ -61,7 +61,10 @@ static gboolean cb_button_press(GtkStatusIcon *plug, GdkEventButton *event, gTra { gMouse::validate(); gMouse::setMouse((int)event->x, (int)event->y, (int)event->x_root, (int)event->y_root, event->button, event->state); - data->onMousePress(data); + if (event->type == GDK_BUTTON_PRESS) + data->onMousePress(data); + else if (event->type == GDK_2BUTTON_PRESS) + data->onDoubleClick(data); gMouse::invalidate(); }