[awesome bugs] #323 - Systray breaks when dynamically changing number of screens

2008-09-22 Thread awesome

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task is now closed:

FS#323 - Systray breaks when dynamically changing number of screens
User who did this - Julien Danjou (jd)

Reason for closing: Duplicate
Additional comments about closing: Duplicate of FS#299

More information can be found at the following URL:
http://awesome.naquadah.org/bugs/index.php?do=detailstask_id=323

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.

--
To unsubscribe, send mail to [EMAIL PROTECTED]


[PATCH] statusbar: always kick out systray before wipe simple window

2008-09-22 Thread Kanru Chen
otherwise systray dies because window is destroyed.
---
 statusbar.c |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/statusbar.c b/statusbar.c
index 85d3947..71430f2 100644
--- a/statusbar.c
+++ b/statusbar.c
@@ -272,9 +272,8 @@ statusbar_position_update(wibox_t *statusbar)
 
 if(statusbar-position == Off)
 {
-xcb_unmap_window(globalconf.connection, statusbar-sw.window);
-/* kick out systray if needed */
-statusbar_systray_refresh(statusbar);
+/* Set need update */
+globalconf.screens[statusbar-screen].need_arrange = true;
 return;
 }
 
@@ -567,8 +566,13 @@ luaA_statusbar_newindex(lua_State *L, wibox_t *statusbar, 
awesome_token_t tok)
 if(p != statusbar-position)
 {
 statusbar-position = p;
-simplewindow_wipe(statusbar-sw);
-statusbar-sw.window = 0;
+xcb_unmap_window(globalconf.connection, statusbar-sw.window);
+statusbar_systray_kickout(statusbar-sw.ctx.phys_screen);
+if(statusbar-sw.window)
+{
+simplewindow_wipe(statusbar-sw);
+statusbar-sw.window = 0;
+}
 if(statusbar-screen != SCREEN_UNDEF)
 {
 for(int i = 0; i  
globalconf.screens[statusbar-screen].statusbars.len; i++)
-- 
1.6.0.1


-- 
To unsubscribe, send mail to [EMAIL PROTECTED]