* BUG: TrayIcon: Handle DblClick and MouseWheel events correctly.

[GB.GTK3]
* BUG: TrayIcon: Handle DblClick and MouseWheel events correctly.


git-svn-id: svn://localhost/gambas/trunk@6095 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-01-22 02:32:08 +00:00
parent d2e0c0ec5f
commit 220f821d9f
3 changed files with 10 additions and 2 deletions

View file

@ -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);

View file

@ -1657,7 +1657,6 @@ void gControl::updateBorder()
if (!GTK_IS_ALIGNMENT(frame))
{
fprintf(stderr, "updateBorder: !alignment\n");
refresh();
return;
}

View file

@ -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();
}