all repos — fluxbox @ b6ae55efd12beacf9261f0c84549c9625f243560

custom fork of the fluxbox windowmanager

Merge with pekdon
fluxgen fluxgen
commit

b6ae55efd12beacf9261f0c84549c9625f243560

parent

98eb553afa016c54b6aeff157bc2240c02603e94

M Makefile.inMakefile.in

@@ -105,9 +105,9 @@ GZIP_ENV = --best

all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status

@@ -276,6 +276,11 @@ distdir: $(DISTFILES)

-rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \
M TODOTODO

@@ -1,15 +1,17 @@

TODO for Fluxbox 0.2.0 +!* Fix "no font" crash +* Remove cyclic dep on Basemenu with class Fluxbox * sloppy focus - auto-raise -- Fix configurable toolbar +* Fix configurable toolbar so the user can configure toolbar in a config file -- Fix so config file is created @ $HOME if first use +* Fix so config file is created @ $HOME if first use and config files is copied and configured -- Fix so toolbar dont hide if its autohide and +* Fix so toolbar dont hide if its autohide and you are in "change workspace mode" -- grabKillWindow to keygrabber grabCloseWindow +* grabKillWindow to keygrabber grabCloseWindow * Fluxbox::real_reconfigure ...check "session.styleFile %s" * grabRootmenu

@@ -22,13 +24,13 @@ * fix "move group to..." without tab bugg.

* 0,0-pos fix * reconfigure tar upp nya dekorationer -07:39AM <dopey> also, (2) fluxbox wont currently build on linux-hppa, needs the config.{sub, +* fluxbox wont currently build on linux-hppa, needs the config.{sub, guess} updated from ftp://ftp.gnu.org/pub/gnu/config/ * Create fbrun style app -* Add wheelscroll-workspace-change configuration (reversed order or +(* Add wheelscroll-workspace-change configuration (reversed order or regular)- Add "system menu" for minimized apps in the toolbar. - (Close, Kill, Send to, etc) + (Close, Kill, Send to, etc) ) * HUP the window manager, so it re-reads the .fluxbox/init - rather than having to kill the window manager to change those
M nls/ru_RU/Makefile.innls/ru_RU/Makefile.in

@@ -104,9 +104,9 @@ GZIP_ENV = --best

all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps nls/ru_RU/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/ru_RU/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

@@ -119,6 +119,11 @@

subdir = nls/ru_RU distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/ru_RU/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \
M nls/ru_RU/Windowmenu.mnls/ru_RU/Windowmenu.m

@@ -2,19 +2,23 @@ $set 10 #Windowmenu

$ #SendTo # Отправить на ... +$ #Send Group To +# Отправить группу на... $ #Shade # Свернуть в заголовок $ #Iconify -# Свернуть в иконку +# Свернуть на панель инструментов $ #Maximize # Максимизировать $ #Raise -# Поднять наверх +# На передний план $ #Lower -# Опустить вниз +# На задний план $ #Stick # Приклеить $ #KillClient -# Убить клиентское приложение +# Снять клиентское приложение $ #Close # Закрыть +$ #Tab +# Tab
M src/Configmenu.ccsrc/Configmenu.cc

@@ -256,7 +256,7 @@ ConfigmenuSet, ConfigmenuAutoRaise,

#else // !NLS 0, 0, #endif // NLS - "Auto Raise"), 3); + "Auto Raise"), 4); update();
M src/Makefile.insrc/Makefile.in

@@ -119,7 +119,8 @@

bin_PROGRAMS = fluxbox -fluxbox_SOURCES = BaseDisplay.cc BaseDisplay.hh Basemenu.cc Basemenu.hh Clientmenu.cc Clientmenu.hh Configmenu.cc Configmenu.hh Icon.cc Icon.hh Image.cc Image.hh LinkedList.cc LinkedList.hh Netizen.cc Netizen.hh Rootmenu.cc Rootmenu.hh Screen.cc Screen.hh Slit.cc Slit.hh Timer.cc Timer.hh Toolbar.cc Toolbar.hh Window.cc Window.hh Windowmenu.cc Windowmenu.hh Workspace.cc Workspace.hh Workspacemenu.cc Workspacemenu.hh fluxbox.cc fluxbox.hh bsd-snprintf.c bsd-snprintf.h i18n.cc i18n.hh main.cc Tab.hh Tab.cc Keys.cc Keys.hh IconBar.cc IconBar.hh Theme.hh Theme.cc misc.hh misc.cc Rotated.hh +fluxbox_SOURCES = BaseDisplay.cc BaseDisplay.hh Basemenu.cc Basemenu.hh Clientmenu.cc Clientmenu.hh Configmenu.cc Configmenu.hh Icon.cc Icon.hh Image.cc Image.hh LinkedList.cc LinkedList.hh Netizen.cc Netizen.hh Rootmenu.cc Rootmenu.hh Screen.cc Screen.hh Slit.cc Slit.hh Timer.cc Timer.hh Toolbar.cc Toolbar.hh Window.cc Window.hh Windowmenu.cc Windowmenu.hh Workspace.cc Workspace.hh Workspacemenu.cc Workspacemenu.hh fluxbox.cc fluxbox.hh bsd-snprintf.c bsd-snprintf.h i18n.cc i18n.hh main.cc Tab.hh Tab.cc Keys.cc Keys.hh IconBar.cc IconBar.hh Theme.hh Theme.cc misc.hh misc.cc + MAINTAINERCLEANFILES = Makefile.in mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs

@@ -160,6 +161,13 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)

TAR = tar GZIP_ENV = --best +DEP_FILES = .deps/BaseDisplay.P .deps/Basemenu.P .deps/Clientmenu.P \ +.deps/Configmenu.P .deps/Icon.P .deps/IconBar.P .deps/Image.P \ +.deps/Keys.P .deps/LinkedList.P .deps/Netizen.P .deps/Rootmenu.P \ +.deps/Screen.P .deps/Slit.P .deps/Tab.P .deps/Theme.P .deps/Timer.P \ +.deps/Toolbar.P .deps/Window.P .deps/Windowmenu.P .deps/Workspace.P \ +.deps/Workspacemenu.P .deps/bsd-snprintf.P .deps/fluxbox.P .deps/i18n.P \ +.deps/main.P .deps/misc.P SOURCES = $(fluxbox_SOURCES) OBJECTS = $(fluxbox_OBJECTS)

@@ -167,9 +175,9 @@ all: all-redirect

.SUFFIXES: .SUFFIXES: .S .c .cc .lo .o .s $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

@@ -199,9 +207,6 @@ list='$(bin_PROGRAMS)'; for p in $$list; do \

rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done -.c.o: - $(COMPILE) -c $< - .s.o: $(COMPILE) -c $<

@@ -217,9 +222,6 @@ distclean-compile:

-rm -f *.tab.c maintainer-clean-compile: - -.c.lo: - $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $<

@@ -279,6 +281,11 @@

subdir = src distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \

@@ -290,6 +297,56 @@ || cp -p $$d/$$file $(distdir)/$$file || :; \

fi; \ done +DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) + +-include $(DEP_FILES) + +mostlyclean-depend: + +clean-depend: + +distclean-depend: + -rm -rf .deps + +maintainer-clean-depend: + +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp + +%.o: %.cc + @echo '$(CXXCOMPILE) -c $<'; \ + $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.cc + @echo '$(LTCXXCOMPILE) -c $<'; \ + $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp info-am: info: info-am dvi-am:

@@ -328,26 +385,27 @@

maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ - mostlyclean-libtool mostlyclean-tags \ + mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \ - clean-generic mostlyclean-am + clean-depend clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \ - distclean-tags distclean-generic clean-am + distclean-tags distclean-depend distclean-generic \ + clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ - maintainer-clean-tags maintainer-clean-generic \ - distclean-am + maintainer-clean-tags maintainer-clean-depend \ + maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild."

@@ -358,12 +416,14 @@ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \

mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ -distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ -dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ -install-exec install-data-am install-data install-am install \ -uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean +distclean-tags clean-tags maintainer-clean-tags distdir \ +mostlyclean-depend distclean-depend clean-depend \ +maintainer-clean-depend info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables.
M src/Screen.ccsrc/Screen.cc

@@ -676,8 +676,6 @@ XSync(fluxbox->getXDisplay(), False);

current_workspace->getLastFocusedWindow()->setInputFocus(); } } - - updateNetizenCurrentWorkspace(); }
M src/Screen.hhsrc/Screen.hh

@@ -168,6 +168,10 @@ inline const int &getRowPlacementDirection(void) const

{ return resource.row_direction; } inline const int &getColPlacementDirection(void) const { return resource.col_direction; } + inline const unsigned int &getTabWidth(void) const + { return resource.tab_width; } + inline const unsigned int &getTabHeight(void) const + { return resource.tab_height; } inline const int getTabPlacement(void) { return resource.tab_placement; } inline const int getTabAlignment(void)

@@ -193,6 +197,8 @@ inline void saveOpaqueMove(Bool o) { resource.opaque_move = o; }

inline void saveFullMax(Bool f) { resource.full_max = f; } inline void saveFocusNew(Bool f) { resource.focus_new = f; } inline void saveFocusLast(Bool f) { resource.focus_last = f; } + inline void saveTabWidth(unsigned int w) { resource.tab_width = w; } + inline void saveTabHeight(unsigned int h) { resource.tab_height = h; } inline void saveTabPlacement(unsigned int p) { resource.tab_placement = p; } inline void saveTabAlignment(unsigned int a) { resource.tab_alignment = a; } inline void saveTabRotateVertical(Bool r)

@@ -309,7 +315,7 @@

int workspaces, toolbar_placement, toolbar_width_percent, placement_policy, edge_snap_threshold, row_direction, col_direction; - unsigned int tab_placement, tab_alignment; + unsigned int tab_placement, tab_alignment, tab_width, tab_height; #ifdef SLIT Bool slit_on_top, slit_auto_hide;
M src/Tab.ccsrc/Tab.cc

@@ -60,11 +60,11 @@

if ((m_win->screen->getTabPlacement() == PLeft || m_win->screen->getTabPlacement() == PRight) && m_win->screen->isTabRotateVertical()) { - m_size_w = Fluxbox::instance()->getTabHeight(); - m_size_h = Fluxbox::instance()->getTabWidth(); + m_size_w = m_win->screen->getTabHeight(); + m_size_h = m_win->screen->getTabWidth(); } else { - m_size_w = Fluxbox::instance()->getTabWidth(); - m_size_h = Fluxbox::instance()->getTabHeight(); + m_size_w = m_win->screen->getTabWidth(); + m_size_h = m_win->screen->getTabHeight(); } createTabWindow();

@@ -297,7 +297,7 @@ void Tab::shade() {

for(Tab *first = getFirst(this); first != 0; first = first->m_next) { if (first==this) continue; - first->m_win->shade(); + first->m_win->shade(); } if (m_win->screen->getTabPlacement() == PLeft ||

@@ -633,7 +633,7 @@ case ACenter:

dest_y -= (m_win->frame.height / 2) - (m_size_h / 2); break; case ALeft: - dest_y -= m_win->frame.height + m_size_h; + dest_y -= m_win->frame.height - m_size_h; break; } break;

@@ -645,13 +645,13 @@ case ACenter:

dest_y -= (m_win->frame.height / 2) - (m_size_h / 2); break; case ALeft: - dest_y -= m_win->frame.height + m_size_h; + dest_y -= m_win->frame.height - m_size_h; break; } break; } - //TODO: this causes an calculate increase event, even if - // only moving a tab! + //TODO: this causes an calculate increase event, even if we + // only are moving a window m_win->configure(dest_x, dest_y, m_win->frame.width, m_win->frame.height); } }

@@ -831,73 +831,56 @@ last->m_next = m_next;

m_next = tab; + bool resize_tabs = false; + //TODO: cleanup and optimize //move and resize all windows in the tablist we inserted //only from first tab of the inserted chain to the last for (; tab!=last->m_next; tab=tab->m_next) { if (m_win->isShaded() != tab->m_win->isShaded()) { + tab->m_stoptabs = true; // we don't want any actions performed on the + // tabs, just the tab windows! if (m_win->screen->getTabPlacement() == PLeft || - m_win->screen->getTabPlacement() == PRight) { - // if window were grouping to, we need to shade the tab window - // _after_ reconfigure - if(m_win->isShaded()) { - tab->m_win->configure(m_win->frame.x, m_win->frame.y, - m_win->frame.width, m_win->frame.height); - tab->m_win->shade(); - // don't need unshading as configure will fix that for me - } else { - if ((m_win->frame.width != tab->m_win->frame.width) || - (m_win->frame.height != tab->m_win->frame.height)) { - tab->m_win->configure(m_win->frame.x, m_win->frame.y, - m_win->frame.width, m_win->frame.height); - } else // need to change shade state as configure _won't_ - // do the trick if the new and old size is the same - tab->m_win->shade(); - } + m_win->screen->getTabPlacement() == PRight) + resize_tabs = true; - tab->resizeGroup(); - tab->calcIncrease(); - - } else { // PTop & PBottom - if(m_win->isShaded()) { - + // if the window we are grouping to, we need to shade the tab window + // _after_ reconfigure + if(m_win->isShaded()) { tab->m_win->configure(m_win->frame.x, m_win->frame.y, m_win->frame.width, m_win->frame.height); tab->m_win->shade(); - // don't need unshading as configure will fix that for me - } else { - if ((m_win->frame.width != tab->m_win->frame.width) || - (m_win->frame.height != tab->m_win->frame.height)) { + } else { + tab->m_win->shade(); // switch to correct shade state + tab->m_win->configure(m_win->frame.x, m_win->frame.y, + m_win->frame.width, m_win->frame.height); + } - tab->m_win->configure(m_win->frame.x, m_win->frame.y, - m_win->frame.width, m_win->frame.height); - } else - tab->m_win->shade(); - } - } + tab->m_stoptabs = false; - // both window have the same shaded state - } else { - if ((m_win->frame.width != tab->m_win->frame.width) || - (m_win->frame.height != tab->m_win->frame.height)) { + // both window have the same shaded state and have different sizes, + // checking this so that I'll only do shade on windows if configure did + // anything. + } else if ((m_win->frame.width != tab->m_win->frame.width) || + (m_win->frame.height != tab->m_win->frame.height)) { - tab->m_win->configure(m_win->frame.x, m_win->frame.y, - m_win->frame.width, m_win->frame.height); + tab->m_win->configure(m_win->frame.x, m_win->frame.y, + m_win->frame.width, m_win->frame.height); - // need to shade the tab window as configure will mess it up - if (m_win->isShaded()) - tab->m_win->shade(); - } + // need to shade the tab window as configure will mess it up + if (m_win->isShaded()) + tab->m_win->shade(); } + } - // TODO: should check if alignemnt is left or right, - // cus then resize is allready done resize tabs - if(m_win->screen->getTabAlignment() == ARelative) { - tab->resizeGroup(); - tab->calcIncrease(); - } - m_win->tab->setPosition(); - } + // resize if in relative mode or resize_tabs is true + if(m_win->screen->getTabAlignment() == ARelative || + resize_tabs) { + resizeGroup(); + calcIncrease(); + } + // reposition tabs + setPosition(); } //---------- disconnect() --------------

@@ -970,11 +953,11 @@ if ((m_win->screen->getTabPlacement() == PLeft ||

m_win->screen->getTabPlacement() == PRight) && m_win->screen->isTabRotateVertical() && !m_win->isShaded()) { - first->setTabWidth(Fluxbox::instance()->getTabHeight()); - first->setTabHeight(Fluxbox::instance()->getTabWidth()); + first->setTabWidth(m_win->screen->getTabHeight()); + first->setTabHeight(m_win->screen->getTabWidth()); } else { - first->setTabWidth(Fluxbox::instance()->getTabWidth()); - first->setTabHeight(Fluxbox::instance()->getTabHeight()); + first->setTabWidth(m_win->screen->getTabWidth()); + first->setTabHeight(m_win->screen->getTabHeight()); } //TODO: do I have to set this all the time? first->m_configured = true; //used in Fluxbox::reconfigure()

@@ -1032,8 +1015,7 @@

//------- getTabPlacementString ---------- // Returns the tabplacement string of the -// tabplacement number on success else -// 0. +// tabplacement number on success else 0. //---------------------------------------- const char *Tab::getTabPlacementString(int placement) { for (int i=0; i<(pnone / 5); i++) {

@@ -1059,8 +1041,7 @@ }

//------- getTabAlignmentString ---------- // Returns the tabplacement string of the -// tabplacement number on success else -// 0. +// tabplacement number on success else 0. //---------------------------------------- const char *Tab::getTabAlignmentString(int placement) { for (int i=0; i<anone; i++) {
M src/Window.ccsrc/Window.cc

@@ -291,12 +291,41 @@ if (fluxbox->isStartup() || transient ||

client.normal_hint_flags & (PPosition|USPosition)) { setGravityOffsets(); - if ((fluxbox->isStartup()) || + if (! fluxbox->isStartup()) { // is going to be used when position + if (decorations.tab) { // window is cleanly fixed + int real_x = frame.x; + int real_y = frame.y; + + if (screen->getTabPlacement() == Tab::PTop) + real_y -= screen->getTabHeight(); + + else if (screen->getTabPlacement() == Tab::PLeft) { + if (screen->isTabRotateVertical()) + real_x -= screen->getTabHeight(); + else + real_x -= screen->getTabWidth(); + } + + if (real_x >= 0 && + real_y + frame.y_border >= 0 && + real_x <= (signed) screen->getWidth() && + real_y <= (signed) screen->getHeight()) + place_window = false; + + } else if (frame.x >= 0 && // non tab + (signed) (frame.y + frame.y_border) >= 0 && + frame.x <= (signed) screen->getWidth() && + frame.y <= (signed) screen->getHeight()) + place_window = false; + } else + place_window = false; + +/* if ((fluxbox->isStartup()) || (frame.x >= 0 && (signed) (frame.y + frame.y_border) >= 0 && frame.x <= (signed) screen->getWidth() && frame.y <= (signed) screen->getHeight())) - place_window = false; + place_window = false; */ }

@@ -1671,6 +1700,9 @@ void FluxboxWindow::setTab(bool flag) {

if (flag) { if (!tab) tab = new Tab(this, 0, 0); + tab->focus(); // draws the tab with correct texture + tab->setPosition(); // set tab windows position + } else if (tab) { delete tab; tab = 0;

@@ -1846,30 +1878,30 @@

if (decorations.tab && Fluxbox::instance()->useTabs()) { // Want to se the tabs switch(screen->getTabPlacement()) { case Tab::PTop: - dy += Fluxbox::instance()->getTabHeight(); - dh -= Fluxbox::instance()->getTabHeight() + screen->getBorderWidth(); + dy += screen->getTabHeight(); + dh -= screen->getTabHeight() + screen->getBorderWidth(); break; case Tab::PLeft: if (screen->isTabRotateVertical()) { - dx += Fluxbox::instance()->getTabHeight(); - dw -= Fluxbox::instance()->getTabHeight(); + dx += screen->getTabHeight(); + dw -= screen->getTabHeight(); } else { - dx += Fluxbox::instance()->getTabWidth(); - dw -= Fluxbox::instance()->getTabWidth(); + dx += screen->getTabWidth(); + dw -= screen->getTabWidth(); } break; case Tab::PRight: if (screen->isTabRotateVertical()) - dw -= Fluxbox::instance()->getTabHeight(); + dw -= screen->getTabHeight(); else - dw -= Fluxbox::instance()->getTabWidth(); + dw -= screen->getTabWidth(); break; case Tab::PBottom: - dh -= Fluxbox::instance()->getTabHeight() + screen->getBorderWidth(); + dh -= screen->getTabHeight() + screen->getBorderWidth(); break; default: - dy += Fluxbox::instance()->getTabHeight(); - dh -= Fluxbox::instance()->getTabHeight() + screen->getBorderWidth(); + dy += screen->getTabHeight(); + dh -= screen->getTabHeight() + screen->getBorderWidth(); break; } }
M src/Windowmenu.ccsrc/Windowmenu.cc

@@ -136,10 +136,15 @@ 0, 0,

#endif // NLS "Close"), BScreen::WindowClose); + insert(i18n->getMessage( +#ifdef NLS + WindowmenuSet, WindowmenuTab, +#else // !NLS + 0, 0, +#endif // NLS + "Tab"), + BScreen::WindowTab); - //TODO: nls - insert("Tab", BScreen::WindowTab); - update(); setItemEnabled(1, window->hasTitlebar());
M src/fluxbox.ccsrc/fluxbox.cc

@@ -1798,32 +1798,6 @@ resource.tabs = false;

} else resource.tabs = true; - if (XrmGetResource(database, "session.tab.width", "Session.Tab.Width", - &value_type, &value)) { - if (sscanf(value.addr, "%d", &resource.tabwidth) != 1) - resource.tabwidth = 64; // default tab width - else { - if (resource.tabwidth < 5) // are these values sane? - resource.tabwidth = 5; - if (resource.tabwidth > 256) - resource.tabwidth = 256; - } - } else - resource.tabwidth = 64; // default tab width - - if (XrmGetResource(database, "session.tab.height", "Session.Tab.Height", - &value_type, &value)) { - if (sscanf(value.addr, "%d", &resource.tabheight) != 1) - resource.tabheight = 16; // default tab height - else { - if (resource.tabheight < 5) // are these values sane? - resource.tabheight = 5; - if (resource.tabheight > 50) - resource.tabheight = 50; - } - } else - resource.tabheight = 16; // default tab height - if (XrmGetResource(database, "session.colorsPerChannel", "Session.ColorsPerChannel", &value_type, &value)) { if (sscanf(value.addr, "%d", &resource.colors_per_channel) != 1)

@@ -2323,6 +2297,46 @@ else

screen->saveOpaqueMove(False); } else screen->saveOpaqueMove(False); + + sprintf(name_lookup, "session.screen%d.tab.width", screen_number); + sprintf(class_lookup, "Session.Screen%d.Tab.Width", screen_number); + if (XrmGetResource(database, name_lookup, class_lookup, + &value_type, &value)) { + unsigned int tmp_val; + + if (sscanf(value.addr, "%d", &tmp_val) != 1) + screen->saveTabWidth(64); // default tab width + else { + //TODO: should we remove checks for max/min? + if (tmp_val > 512) + screen->saveTabWidth(512); + else if (tmp_val < 5) + screen->saveTabWidth(5); + else + screen->saveTabWidth(tmp_val); + } + } else + screen->saveTabWidth(64); // default tab width + + sprintf(name_lookup, "session.screen%d.tab.height", screen_number); + sprintf(class_lookup, "Session.Screen%d.Tab.Height", screen_number); + if (XrmGetResource(database, name_lookup, class_lookup, + &value_type, &value)) { + unsigned int tmp_val; + + if (sscanf(value.addr, "%d", &tmp_val) != 1) + screen->saveTabHeight(16); // default tab height + else { + //TODO: should we remove checks for max/min? + if (tmp_val > 50) + screen->saveTabHeight(50); + else if (tmp_val < 5) + screen->saveTabHeight(5); + else + screen->saveTabHeight(tmp_val); + } + } else + screen->saveTabHeight(16); // default tab height sprintf(name_lookup, "session.screen%d.tab.placement", screen_number); sprintf(class_lookup, "Session.Screen%d.Tab.Placement", screen_number);
M src/fluxbox.hhsrc/fluxbox.hh

@@ -94,7 +94,6 @@

static Fluxbox *instance(int m_argc=0, char **m_argv=0, char *dpy_name=0, char *rc=0); inline bool useTabs() const { return resource.tabs; } -// inline TabType &getTabType() { return resource.tabtype; } inline bool useIconBar() const { return resource.iconbar; } inline void saveTabs(bool value) { resource.tabs = value; } inline void saveIconBar(bool value) { resource.iconbar = value; }

@@ -144,9 +143,6 @@ inline const unsigned long &getCacheLife(void) const

{ return resource.cache_life; } inline const unsigned long &getCacheMax(void) const { return resource.cache_max; } - inline const unsigned int &getTabWidth(void) const { return resource.tabwidth; } - inline const unsigned int &getTabHeight(void) const { return resource.tabheight; } - inline void maskWindowEvents(Window w, FluxboxWindow *bw) { masked = w; masked_window = bw; }

@@ -220,8 +216,6 @@ int colors_per_channel;

timeval auto_raise_delay; unsigned long cache_life, cache_max; bool tabs, iconbar; - //TabType tabtype; - unsigned int tabwidth, tabheight; } resource; struct titlebar_t {