summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2599134)
raw | patch | inline | side by side (parent: 2599134)
author | Eric Wertz <ericdwertz@gmail.com> | |
Fri, 24 Feb 2017 21:33:03 +0000 (16:33 -0500) | ||
committer | Eric Wertz <ericdwertz@gmail.com> | |
Fri, 24 Feb 2017 21:33:03 +0000 (16:33 -0500) |
Makefile | patch | blob | history | |
dock_icon.c | patch | blob | history | |
main.c | patch | blob | history | |
pager_item.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index 23065cbb5bf33a11cc2417324d5c9e1ec2bad909..77ec352ffe833b9b3207e14b695312ddcca80241 100644 (file)
--- a/Makefile
+++ b/Makefile
CC = gcc
-CFLAGS = -Wall -lm -lX11 `pkg-config --cflags gtk+-3.0 libwnck-3.0`
+CFLAGS = -g -Wall -lm -lX11 `pkg-config --cflags gtk+-3.0 libwnck-3.0`
LDFLAGS = `pkg-config --libs gtk+-3.0 libwnck-3.0`
DEPS = dock_icon.h ericdock.h clock.h drawing.h eric_window.h pager_item.h tooltip_window.h
OBJ = dock_icon.o tooltip_window.o eric_window.o clock.o main.o pager_item.o drawing.o
diff --git a/dock_icon.c b/dock_icon.c
index ab5bf70274bd0d683464d6c334833d709141e3d8..84634c666fc92083a12c5543c6732a6d4a59f385 100644 (file)
--- a/dock_icon.c
+++ b/dock_icon.c
printf( "class: %s\ninstance%s\n",
class_name,
instance_name );
- int i;
- for( i = 0; class_name[i] && i < 256; i++ )
- class_lower[i] = tolower( class_name[i] );
- for( i = 0; instance_name[i] && i < 256; i++ )
- instance_lower[i] = tolower( instance_name[i] );
-
- //Use the window's icon
- if( strcmp( class_lower, instance_lower ) != 0 )
+ if( class_name != NULL && instance_name != NULL )
{
- pixbuf = wnck_window_get_icon( window );
+ int i;
+ for( i = 0; class_name[i] && i < 256; i++ )
+ class_lower[i] = tolower( class_name[i] );
+ for( i = 0; instance_name[i] && i < 256; i++ )
+ instance_lower[i] = tolower( instance_name[i] );
+
+ //Use the window's icon
+ if( strcmp( class_lower, instance_lower ) != 0 )
+ {
+ pixbuf = wnck_window_get_icon( window );
+ }
}
//Check for desktop file entry
index 78a442af8679f77d10bfda245151b8bbf097a375..6c47a44175d572dc45631a681e384515f0ee814b 100644 (file)
--- a/main.c
+++ b/main.c
for( icon_list = dock_icons; icon_list != NULL; icon_list = icon_list->next )
{
icon = (dock_icon*)icon_list->data;
- if( strcmp( icon->instance_name, instance_name ) == 0 )
+ if( icon->instance_name != NULL && instance_name != NULL && strcmp( icon->instance_name, instance_name ) == 0 )
{
icon->pager_items = g_list_append( icon->pager_items, pager_item_create( window ) );
found_class_group = 1;
diff --git a/pager_item.c b/pager_item.c
index 83afcd363ee6347960b27691408973d62e19b3ac..bc9dbf122cdcf6f1751770c5efb20244cb4fbe9c 100644 (file)
--- a/pager_item.c
+++ b/pager_item.c
void pager_item_draw( pager_item* item, cairo_t* cr, eric_window* w, cairo_pattern_t* pattern )
{
+ if( !GDK_IS_PIXBUF( item->icon_pixbuf ) )
+ {
+ item->icon_pixbuf = get_icon( item->window, (int)SCALE_VALUE( 16.0 ) );
+ if( !GDK_IS_PIXBUF( item->icon_pixbuf ) )
+ return;
+ }
+
if( item->icon_state == ICON_STATE_HOVER )
{
w->text_color.alpha = 0.25;