[GB.GTK]
* 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:
parent
d2e0c0ec5f
commit
220f821d9f
3 changed files with 10 additions and 2 deletions
|
@ -89,6 +89,11 @@ static void Tray_lostFocus(gTrayIcon *sender)
|
||||||
GB.Raise(sender->hFree,EVENT_LostFocus,0);
|
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)
|
static int CTRAYICON_check(void *_object)
|
||||||
{
|
{
|
||||||
return TRAYICON == NULL;
|
return TRAYICON == NULL;
|
||||||
|
@ -110,6 +115,7 @@ BEGIN_METHOD_VOID(CTRAYICON_new)
|
||||||
TRAYICON->onDoubleClick=Tray_dblClick;
|
TRAYICON->onDoubleClick=Tray_dblClick;
|
||||||
TRAYICON->onEnter=Tray_enter;
|
TRAYICON->onEnter=Tray_enter;
|
||||||
TRAYICON->onLeave=Tray_leave;
|
TRAYICON->onLeave=Tray_leave;
|
||||||
|
TRAYICON->onMouseWheel = cb_mouse_wheel;
|
||||||
|
|
||||||
GB.Ref(THIS);
|
GB.Ref(THIS);
|
||||||
//Add_Tray(_object);
|
//Add_Tray(_object);
|
||||||
|
|
|
@ -1657,7 +1657,6 @@ void gControl::updateBorder()
|
||||||
|
|
||||||
if (!GTK_IS_ALIGNMENT(frame))
|
if (!GTK_IS_ALIGNMENT(frame))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "updateBorder: !alignment\n");
|
|
||||||
refresh();
|
refresh();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,10 @@ static gboolean cb_button_press(GtkStatusIcon *plug, GdkEventButton *event, gTra
|
||||||
{
|
{
|
||||||
gMouse::validate();
|
gMouse::validate();
|
||||||
gMouse::setMouse((int)event->x, (int)event->y, (int)event->x_root, (int)event->y_root, event->button, event->state);
|
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();
|
gMouse::invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue