From 123c8bef7d1c5a796da5e81d9f39cb2526737a73 Mon Sep 17 00:00:00 2001 From: o9000 Date: Tue, 25 Oct 2011 09:57:21 +0000 Subject: [PATCH] Disable mouse hover events when the launcher tooltip is disabled Do not use g_slist_free_full since it requires glib 2.28 git-svn-id: http://tint2.googlecode.com/svn/trunk@645 121b4492-b84c-0410-8b4c-0d4edfb3f3cc --- src/launcher/launcher.c | 6 +++++- src/panel.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c index ab4ca29..cb4aa9b 100644 --- a/src/launcher/launcher.c +++ b/src/launcher/launcher.c @@ -104,6 +104,7 @@ void init_launcher_panel(void *p) void cleanup_launcher() { int i; + GSList *l; if (xsettings_client) xsettings_client_destroy(xsettings_client); @@ -112,7 +113,10 @@ void cleanup_launcher() Launcher *launcher = &panel->launcher; cleanup_launcher_theme(launcher); } - g_slist_free_full(panel_config.launcher.list_apps, free); + for (l = panel_config.launcher.list_apps; l ; l = l->next) { + free(l->data); + } + g_slist_free(panel_config.launcher.list_apps); panel_config.launcher.list_apps = NULL; free(icon_theme_name); icon_theme_name = 0; diff --git a/src/panel.c b/src/panel.c index becc2aa..b136ff3 100644 --- a/src/panel.c +++ b/src/panel.c @@ -199,7 +199,7 @@ void init_panel() p->main_win = XCreateWindow(server.dsp, server.root_win, p->posx, p->posy, p->area.width, p->area.height, 0, server.depth, InputOutput, server.visual, mask, &att); long event_mask = ExposureMask|ButtonPressMask|ButtonReleaseMask|ButtonMotionMask; - if (p->g_task.tooltip_enabled || p->clock.area._get_tooltip_text || p->launcher.area.on_screen) + if (p->g_task.tooltip_enabled || p->clock.area._get_tooltip_text || (launcher_enabled && launcher_tooltip_enabled)) event_mask |= PointerMotionMask|LeaveWindowMask; if (panel_autohide) event_mask |= LeaveWindowMask|EnterWindowMask;