fixed iconbar update bug
fluxgen fluxgen
2 files changed,
23 insertions(+),
21 deletions(-)
M
src/Window.cc
→
src/Window.cc
@@ -22,7 +22,9 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.39 2002/04/04 14:23:30 fluxgen Exp $ +// $Id: Window.cc,v 1.40 2002/04/04 22:39:52 fluxgen Exp $ + +#include "Window.hh" //use GNU extensions #ifndef _GNU_SOURCE@@ -38,7 +40,6 @@ #include "fluxbox.hh"
#include "Icon.hh" #include "Screen.hh" #include "Toolbar.hh" -#include "Window.hh" #include "Windowmenu.hh" #include "StringUtil.hh"@@ -1430,7 +1431,7 @@ XTextProperty text_prop;
char **list; int num; I18n *i18n = I18n::instance(); - + if (XGetWMName(display, client.window, &text_prop)) { if (text_prop.value && text_prop.nitems > 0) { if (text_prop.encoding != XA_STRING) {@@ -1469,6 +1470,7 @@ getTitle().c_str(), getTitle().size());
} client.title_text_w += (frame.bevel_w * 4); + }@@ -1498,6 +1500,7 @@ } else
client.icon_title = getTitle(); } else client.icon_title = getTitle(); + }@@ -2971,6 +2974,7 @@
case XA_WM_ICON_NAME: getWMIconName(); if (iconic) screen->iconUpdate(); + updateIcon(); break; case XA_WM_NAME:@@ -2984,22 +2988,9 @@ getTab()->draw(false);
if (! iconic) screen->getWorkspace(workspace_number)->update(); - else if (Fluxbox::instance()->useIconBar()) { - IconBar *iconbar = 0; - IconBarObj *icon = 0; - if ((iconbar = screen->getToolbar()->getIconBar()) != 0) { - if ((icon = iconbar->findIcon(this)) != 0) - iconbar->draw(icon, icon->getWidth()); -#ifdef DEBUG - else - cerr<<__FILE__<<"("<<__LINE__<<"): can't find icon!"<<endl; -#endif //DEBUG - } -#ifdef DEBUG - else - cerr<<__FILE__<<"("<<__LINE__<<"): can't find iconbar!"<<endl; -#endif //DEBUG - } + else + updateIcon(); + break;@@ -3607,6 +3598,17 @@ Fluxbox::instance()->ungrab();
XUngrabPointer(display, CurrentTime); } +//finds and redraw the icon label +void FluxboxWindow::updateIcon() { + if (Fluxbox::instance()->useIconBar()) { + IconBar *iconbar = 0; + IconBarObj *icon = 0; + if ((iconbar = screen->getToolbar()->getIconBar()) != 0) { + if ((icon = iconbar->findIcon(this)) != 0) + iconbar->draw(icon, icon->getWidth()); + } + } +} void FluxboxWindow::restore(void) { XChangeSaveSet(display, client.window, SetModeDelete);
M
src/Window.hh
→
src/Window.hh
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.hh,v 1.17 2002/04/04 14:23:30 fluxgen Exp $ +// $Id: Window.hh,v 1.18 2002/04/04 22:39:52 fluxgen Exp $ #ifndef WINDOW_HH #define WINDOW_HH@@ -317,7 +317,7 @@ void startMoving(Window win);
void stopMoving(); void startResizing(XMotionEvent *me, bool left); void stopResizing(Window win=0); - + void updateIcon(); #ifdef GNOME