Bug #109 » 0031-gtk4-x-Fix-animations.patch
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 | ||
---|---|---|
* 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();
|
||
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();
|
client/gui-gtk-5.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-5.0/gui_main.h | ||
---|---|---|
#define GUI_GTK_DEFAULT_THEME_NAME FC_GTK5_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-5.0/mapview.c | ||
---|---|---|
* 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();
|
||
unqueue_mapview_updates(FALSE);
|
||
cairo_scale(cr, mouse_zoom, mouse_zoom);
|
||
cairo_set_source_surface(cr, mapview.store->surface, 0, 0);
|
client/gui-gtk-5.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();
|