summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-01-05 22:38:53 (GMT)
committerfluxgen <fluxgen>2003-01-05 22:38:53 (GMT)
commitf61ff3329e53ce7cfd80c881fc5846af9a37a485 (patch)
tree14634c9ebdc7050e5d61fcb2690877b6411792e8
parent1cc72819ff8ecaec05eb9d372af2e0ac0918f5b2 (diff)
downloadfluxbox_lack-f61ff3329e53ce7cfd80c881fc5846af9a37a485.zip
fluxbox_lack-f61ff3329e53ce7cfd80c881fc5846af9a37a485.tar.bz2
using moveresize instead of configure in fluxboxwindow
-rw-r--r--src/Tab.cc31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/Tab.cc b/src/Tab.cc
index 41049de..b72942c 100644
--- a/src/Tab.cc
+++ b/src/Tab.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Tab.cc,v 1.48 2002/12/07 13:36:03 fluxgen Exp $ 22// $Id: Tab.cc,v 1.49 2003/01/05 22:38:53 fluxgen Exp $
23 23
24#include "Tab.hh" 24#include "Tab.hh"
25 25
@@ -319,7 +319,7 @@ void Tab::resize() {
319 //now move and resize the windows in the list 319 //now move and resize the windows in the list
320 for (tab = getFirst(this); tab != 0; tab = tab->m_next) { 320 for (tab = getFirst(this); tab != 0; tab = tab->m_next) {
321 if (tab!=this) { 321 if (tab!=this) {
322 tab->m_win->configure(m_win->getXFrame(), m_win->getYFrame(), 322 tab->m_win->moveResize(m_win->getXFrame(), m_win->getYFrame(),
323 m_win->getWidth(), m_win->getHeight()); 323 m_win->getWidth(), m_win->getHeight());
324 } 324 }
325 } 325 }
@@ -375,12 +375,12 @@ void Tab::draw(bool pressed) const {
375 if (winstyle->tab.font.isRotated() && !m_win->isShaded()) 375 if (winstyle->tab.font.isRotated() && !m_win->isShaded())
376 max_width = m_size_h; 376 max_width = m_size_h;
377 377
378 int dx = DrawUtil::doAlignment(max_width, m_win->frame.bevel_w, 378 int dx = DrawUtil::doAlignment(max_width, 1, //m_win->frame.bevel_w,
379 winstyle->tab.justify, 379 winstyle->tab.justify,
380 winstyle->tab.font, 380 winstyle->tab.font,
381 m_win->getTitle().c_str(), m_win->getTitle().size(), dlen); 381 m_win->getTitle().c_str(), m_win->getTitle().size(), dlen);
382 382
383 int dy = winstyle->tab.font.ascent() + m_win->frame.bevel_w; 383 int dy = winstyle->tab.font.ascent() + 1; //m_win->frame.bevel_w;
384 bool rotate = false; 384 bool rotate = false;
385 // swap dx and dy if we're rotated 385 // swap dx and dy if we're rotated
386 if (winstyle->tab.font.isRotated() && !m_win->isShaded()) { 386 if (winstyle->tab.font.isRotated() && !m_win->isShaded()) {
@@ -533,8 +533,8 @@ void Tab::setPosition() {
533 XMoveWindow(m_display, tab->m_tabwin, pos_x, pos_y); 533 XMoveWindow(m_display, tab->m_tabwin, pos_x, pos_y);
534 534
535 //dont move FluxboxWindow if the iterator = this 535 //dont move FluxboxWindow if the iterator = this
536 if (tab!=this) { 536 if (tab != this) {
537 tab->m_win->configure(m_win->getXFrame(), m_win->getYFrame(), 537 tab->m_win->moveResize(m_win->getXFrame(), m_win->getYFrame(),
538 m_win->getWidth(), m_win->getHeight()); 538 m_win->getWidth(), m_win->getHeight());
539 } 539 }
540 } 540 }
@@ -669,10 +669,10 @@ void Tab::buttonPressEvent(XButtonEvent *be) {
669 //otherwise let the window handle the event 669 //otherwise let the window handle the event
670 else { 670 else {
671 //set window to titlewindow so we can take advantage of drag function 671 //set window to titlewindow so we can take advantage of drag function
672 be->window = m_win->frame.title; 672 be->window = m_win->frame().titlebar().window();
673 673
674 //call windows buttonpress eventhandler 674 //call windows buttonpress eventhandler
675 m_win->buttonPressEvent(be); 675 m_win->buttonPressEvent(*be);
676 } 676 }
677} 677}
678 678
@@ -770,9 +770,10 @@ void Tab::buttonReleaseEvent(XButtonEvent *be) {
770 } 770 }
771 //TODO: this causes an calculate increase event, even if we 771 //TODO: this causes an calculate increase event, even if we
772 // only are moving a window 772 // only are moving a window
773 m_win->configure(dest_x, dest_y, m_win->getWidth(), m_win->getHeight()); 773 m_win->moveResize(dest_x, dest_y, m_win->getWidth(), m_win->getHeight());
774
774 if(!Fluxbox::instance()->useTabs()) 775 if(!Fluxbox::instance()->useTabs())
775 m_win->setTab(0);//Remove tab from window, as it is now alone... 776 m_win->setTab(false);//Remove tab from window, as it is now alone...
776 } 777 }
777 } 778 }
778 } else { 779 } else {
@@ -781,10 +782,10 @@ void Tab::buttonReleaseEvent(XButtonEvent *be) {
781 raise(); 782 raise();
782 783
783 //set window to title window soo we can use m_win handler for menu 784 //set window to title window soo we can use m_win handler for menu
784 be->window = m_win->frame.title; 785 be->window = m_win->frame().titlebar().window();
785 786
786 //call windows buttonrelease event handler so it can popup a menu if needed 787 //call windows buttonrelease event handler so it can popup a menu if needed
787 m_win->buttonReleaseEvent(be); 788 m_win->buttonReleaseEvent(*be);
788 } 789 }
789 790
790} 791}
@@ -968,12 +969,12 @@ void Tab::insert(Tab *tab) {
968 // if the window we are grouping to, we need to shade the tab window 969 // if the window we are grouping to, we need to shade the tab window
969 // _after_ reconfigure 970 // _after_ reconfigure
970 if(m_win->isShaded()) { 971 if(m_win->isShaded()) {
971 tab->m_win->configure(m_win->getXFrame(), m_win->getYFrame(), 972 tab->m_win->moveResize(m_win->getXFrame(), m_win->getYFrame(),
972 m_win->getWidth(), m_win->getHeight()); 973 m_win->getWidth(), m_win->getHeight());
973 tab->m_win->shade(); 974 tab->m_win->shade();
974 } else { 975 } else {
975 tab->m_win->shade(); // switch to correct shade state 976 tab->m_win->shade(); // switch to correct shade state
976 tab->m_win->configure(m_win->getXFrame(), m_win->getYFrame(), 977 tab->m_win->moveResize(m_win->getXFrame(), m_win->getYFrame(),
977 m_win->getWidth(), m_win->getHeight()); 978 m_win->getWidth(), m_win->getHeight());
978 } 979 }
979 980
@@ -985,7 +986,7 @@ void Tab::insert(Tab *tab) {
985 } else if ((m_win->getWidth() != tab->m_win->getWidth()) || 986 } else if ((m_win->getWidth() != tab->m_win->getWidth()) ||
986 (m_win->getHeight() != tab->m_win->getHeight())) { 987 (m_win->getHeight() != tab->m_win->getHeight())) {
987 988
988 tab->m_win->configure(m_win->getXFrame(), m_win->getYFrame(), 989 tab->m_win->moveResize(m_win->getXFrame(), m_win->getYFrame(),
989 m_win->getWidth(), m_win->getHeight()); 990 m_win->getWidth(), m_win->getHeight());
990 991
991 // need to shade the tab window as configure will mess it up 992 // need to shade the tab window as configure will mess it up