forked from AuroraMiddleware/gtk
gdk: Add crossing mode and detail to focus events
We want focus events more similar to crossing events.
This commit is contained in:
parent
a3abf0693d
commit
8d5f1ae662
@ -1980,6 +1980,11 @@ gdk_event_get_crossing_mode (const GdkEvent *event,
|
|||||||
*mode = event->crossing.mode;
|
*mode = event->crossing.mode;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
else if (event->any.type == GDK_FOCUS_CHANGE)
|
||||||
|
{
|
||||||
|
*mode = event->focus_change.mode;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -2006,6 +2011,11 @@ gdk_event_get_crossing_detail (const GdkEvent *event,
|
|||||||
*detail = event->crossing.detail;
|
*detail = event->crossing.detail;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
else if (event->any.type == GDK_FOCUS_CHANGE)
|
||||||
|
{
|
||||||
|
*detail = event->focus_change.detail;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -312,6 +312,8 @@ struct _GdkEventCrossing
|
|||||||
* @send_event: %TRUE if the event was sent explicitly.
|
* @send_event: %TRUE if the event was sent explicitly.
|
||||||
* @in: %TRUE if the surface has gained the keyboard focus, %FALSE if
|
* @in: %TRUE if the surface has gained the keyboard focus, %FALSE if
|
||||||
* it has lost the focus.
|
* it has lost the focus.
|
||||||
|
* @mode: the crossing mode
|
||||||
|
* @detail: the kind of crossing that happened
|
||||||
*
|
*
|
||||||
* Describes a change of keyboard focus.
|
* Describes a change of keyboard focus.
|
||||||
*/
|
*/
|
||||||
@ -319,6 +321,8 @@ struct _GdkEventFocus
|
|||||||
{
|
{
|
||||||
GdkEventAny any;
|
GdkEventAny any;
|
||||||
gint16 in;
|
gint16 in;
|
||||||
|
GdkCrossingMode mode;
|
||||||
|
GdkNotifyType detail;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user