summaryrefslogtreecommitdiffstats
path: root/source/widgets/widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/widgets/widget.c')
-rw-r--r--source/widgets/widget.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/widgets/widget.c b/source/widgets/widget.c
index 93c14cff..04f52008 100644
--- a/source/widgets/widget.c
+++ b/source/widgets/widget.c
@@ -1,6 +1,16 @@
#include <glib.h>
#include "widgets/widget.h"
#include "widgets/widget-internal.h"
+#include "theme.h"
+
+
+void widget_init ( widget *widget , const char *name, const char *class_name )
+{
+ widget->name = g_strdup(name);
+ widget->class_name = g_strdup(class_name);
+ widget->pad = rofi_theme_get_padding (widget->class_name, widget->name, NULL, "padding", (Padding){0,0,0,0,FALSE});
+
+}
int widget_intersect ( const widget *widget, int x, int y )
{
@@ -72,6 +82,9 @@ void widget_free ( widget *wid )
if ( wid->name ) {
g_free ( wid->name );
}
+ if ( wid->class_name ) {
+ g_free( wid->class_name );
+ }
if ( wid->free ) {
wid->free ( wid );
}