Skip to content

Commit cb54360

Browse files
authored
tray: linux fix tray menu elements not running callbacks (#13626)
1 parent e1a623f commit cb54360

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/core/unix/SDL_gtk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,6 @@ void SDL_UpdateGtk(void)
223223
{
224224
if (IsGtkInit()) {
225225
gtk.g.main_context_iteration(sdl_main_context, GTK_FALSE);
226+
gtk.g.main_context_iteration(NULL, GTK_FALSE);
226227
}
227228
}

src/core/unix/SDL_gtk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ typedef struct _GtkSettings GtkSettings;
7474
typedef struct SDL_GtkContext
7575
{
7676
/* Glib 2.0 */
77-
struct
77+
struct
7878
{
7979
gulong (*signal_connect)(gpointer instance, const gchar *detailed_signal, void *c_handler, gpointer data);
8080
gulong (*signal_connect_data)(gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data, GClosureNotify destroy_data, SDL_GConnectFlags connect_flags);

src/tray/unix/SDL_tray.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct SDL_Tray {
166166
GtkMenuShell *menu_cached;
167167
};
168168

169-
static void call_callback(GtkMenuItem *item, GParamSpec *pspec, gpointer ptr)
169+
static void call_callback(GtkMenuItem *item, gpointer ptr)
170170
{
171171
SDL_TrayEntry *entry = ptr;
172172

@@ -404,7 +404,7 @@ SDL_TrayMenu *SDL_CreateTraySubmenu(SDL_TrayEntry *entry)
404404
SDL_SetError("Cannot create submenu for entry not created with SDL_TRAYENTRY_SUBMENU");
405405
return NULL;
406406
}
407-
407+
408408
SDL_GtkContext *gtk = SDL_Gtk_EnterContext();
409409
if (!gtk) {
410410
return NULL;

0 commit comments

Comments
 (0)