Project

General

Profile

Bug #109 » 0013-gtk4-Fix-animations.patch

S3_2, S3_1 - Marko Lindqvist, 01/02/2024 03:28 AM

View differences:

client/gui-gtk-4.0/gui_main.c
g_idle_add(idle_callback_wrapper, cb);
}
/**********************************************************************//**
Add idle callback for updating animations.
**************************************************************************/
void animation_idle_cb(void *data)
{
if (get_current_client_page() == PAGE_GAME) {
update_animation();
add_idle_callback(animation_idle_cb, NULL);
}
}
/**********************************************************************//**
Option callback for the 'allied_chat_only' gtk-gui option.
This updates the state of the associated toggle button.
client/gui-gtk-4.0/gui_main.h
#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK4_DEFAULT_THEME_NAME
void main_message_area_resize(void *data);
void animation_idle_cb(void *data);
/* Network string charset conversion */
gchar *ntoh_str(const gchar *netstr);
client/gui-gtk-4.0/mapview.c
int width, int height, gpointer data)
{
if (can_client_change_view() && !map_is_empty() && !mapview_is_frozen()) {
/* First we mark the area to be updated as dirty. Then we unqueue
/* First we mark the area to be updated as dirty. Then we unqueue
* any pending updates, to make sure only the most up-to-date data
* is written (otherwise drawing bugs happen when old data is copied
* to screen). Then we draw all changed areas to the screen. */
update_animation();
* to screen). Then we draw all changed areas to the screen. */
unqueue_mapview_updates(FALSE);
cairo_scale(cr, mouse_zoom, mouse_zoom);
cairo_set_source_surface(cr, mapview.store->surface, 0, 0);
client/gui-gtk-4.0/pages.c
center_on_something();
mapview_thaw();
add_idle_callback(main_message_area_resize, NULL);
add_idle_callback(animation_idle_cb, NULL);
break;
case PAGE_NETWORK:
update_network_lists();
(2-2/2)