Skip to content

Commit

Permalink
FIX: support gcc14 -Werror=incompatible-pointer-types
Browse files Browse the repository at this point in the history
gcc14 now defaults to -Werror=incompatible-pointer-types .
To support this, cast GTK related objects for assignment
properly.

Fixes lxde#100 .
  • Loading branch information
mtasaka committed Mar 1, 2024
1 parent 5346a53 commit ec6a212
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gtk/exo/exo-icon-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,7 @@ exo_icon_view_key_press_event (GtkWidget *widget,
/* allocate a new event to forward */
new_event = gdk_event_copy ((GdkEvent *) event);
g_object_unref (G_OBJECT (new_event->key.window));
new_event->key.window = g_object_ref (G_OBJECT (gtk_widget_get_window (icon_view->priv->search_entry)));
new_event->key.window = GDK_WINDOW(g_object_ref (G_OBJECT (gtk_widget_get_window (icon_view->priv->search_entry))));

/* send the event to the search entry. If the "preedit-changed" signal is
* emitted during this event, priv->search_imcontext_changed will be set.
Expand Down
2 changes: 1 addition & 1 deletion src/gtk/fm-dnd-dest.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ static GdkDragAction _ask_action_on_drop(GtkWidget *widget,
gtk_action_set_sensitive(act, FALSE);
}
}
ri.menu = g_object_ref(gtk_ui_manager_get_widget(ui, "/popup"));
ri.menu = GTK_MENU(g_object_ref(gtk_ui_manager_get_widget(ui, "/popup")));
g_signal_connect(ri.menu, "selection-done", G_CALLBACK(gtk_widget_destroy), NULL);
unmap_handler = g_signal_connect(ri.menu, "unmap",
G_CALLBACK(run_unmap_handler), &ri);
Expand Down
2 changes: 1 addition & 1 deletion src/gtk/fm-standard-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static inline void create_icon_view(FmStandardView* fv, GList* sels)
"text", FM_FOLDER_MODEL_COL_NAME );
if(fv->renderer_text)
g_object_unref(fv->renderer_text);
fv->renderer_text = g_object_ref_sink(render);
fv->renderer_text = FM_CELL_RENDERER_TEXT(g_object_ref_sink(render));
exo_icon_view_set_search_column((ExoIconView*)fv->view, FM_FOLDER_MODEL_COL_NAME);
g_signal_connect(fv->view, "item-activated", G_CALLBACK(on_icon_view_item_activated), fv);
g_signal_connect(fv->view, "selection-changed", G_CALLBACK(on_sel_changed), fv);
Expand Down

0 comments on commit ec6a212

Please sign in to comment.