mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-29 01:08:44 +00:00
tray: linux fix tray menu elements not running callbacks (#13626)
This commit is contained in:
parent
e1a623f129
commit
cb5436045d
3 changed files with 4 additions and 3 deletions
|
|
@ -223,5 +223,6 @@ void SDL_UpdateGtk(void)
|
|||
{
|
||||
if (IsGtkInit()) {
|
||||
gtk.g.main_context_iteration(sdl_main_context, GTK_FALSE);
|
||||
gtk.g.main_context_iteration(NULL, GTK_FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ typedef struct _GtkSettings GtkSettings;
|
|||
typedef struct SDL_GtkContext
|
||||
{
|
||||
/* Glib 2.0 */
|
||||
struct
|
||||
struct
|
||||
{
|
||||
gulong (*signal_connect)(gpointer instance, const gchar *detailed_signal, void *c_handler, gpointer data);
|
||||
gulong (*signal_connect_data)(gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data, GClosureNotify destroy_data, SDL_GConnectFlags connect_flags);
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ struct SDL_Tray {
|
|||
GtkMenuShell *menu_cached;
|
||||
};
|
||||
|
||||
static void call_callback(GtkMenuItem *item, GParamSpec *pspec, gpointer ptr)
|
||||
static void call_callback(GtkMenuItem *item, gpointer ptr)
|
||||
{
|
||||
SDL_TrayEntry *entry = ptr;
|
||||
|
||||
|
|
@ -404,7 +404,7 @@ SDL_TrayMenu *SDL_CreateTraySubmenu(SDL_TrayEntry *entry)
|
|||
SDL_SetError("Cannot create submenu for entry not created with SDL_TRAYENTRY_SUBMENU");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SDL_GtkContext *gtk = SDL_Gtk_EnterContext();
|
||||
if (!gtk) {
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue