#include "screen.h"
#include "display.h"
+#include "plugin.h"
#include "list.h"
#include "time.h"
#include "window.h"
sc->winhash = g_hash_table_new((GHashFunc)xcb_window_hash,
(GEqualFunc)xcb_window_equal);
sc->stacking = list_new();
- sc->plugin_data = g_hash_table_new_full((GHashFunc)g_str_hash,
- (GEqualFunc)g_str_equal,
- g_free, NULL);
+ sc->plugin_data = list_new();
return sc;
}
if (sc && --sc->ref == 0) {
g_hash_table_unref(sc->winhash);
list_unref(sc->stacking);
- g_hash_table_unref(sc->plugin_data);
+ list_unref(sc->plugin_data);
free(sc);
}
}
screen_set_next_repaint(d_screen_t *sc)
{
gettimeofday(&sc->next_repaint, NULL);
- /* add time for the refresh rate (60 hz) */
- time_add(&sc->next_repaint, 1000000/60);
+ /* add time for the refresh rate (30 hz) */
+ time_add(&sc->next_repaint, 1000000/30);
sc->need_repaint = FALSE;
}
sc->window_show = window_show;
sc->window_hide = window_hide;
sc->window_become_zombie = window_become_zombie;
- sc->window_reconfigure = window_reconfigure;
+ sc->window_move = window_move;
+ sc->window_resize = window_resize;
}
void
-screen_add_plugin_data(d_screen_t *sc, const char *key, void *data)
+screen_add_plugin_data(d_screen_t *sc, int id, void *data)
{
- char *skey = g_strdup(key);
- g_hash_table_replace(sc->plugin_data, skey, data);
+ plugin_data_add(sc->plugin_data, id, data);
}
void*
-screen_find_plugin_data(d_screen_t *sc, const char *key)
+screen_find_plugin_data(d_screen_t *sc, int id)
{
- return g_hash_table_lookup(sc->plugin_data, key);
+ return plugin_data_find(sc->plugin_data, id);
}
void
-screen_remove_plugin_data(d_screen_t *sc, const char *key)
+screen_remove_plugin_data(d_screen_t *sc, int id)
{
- g_hash_table_remove(sc->plugin_data, key);
+ plugin_data_remove(sc->plugin_data, id);
}
void screen_refresh(d_screen_t *sc)