aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathias <mathias>2004-11-24 23:28:10 (GMT)
committermathias <mathias>2004-11-24 23:28:10 (GMT)
commit65f4f32366750e56df49295b7ecfa4646e582880 (patch)
tree7b8728d2697045ebeadf249affe5750937df5f9d /src
parenta932a7a80169253fb29be8f1bed87f510cefad24 (diff)
downloadfluxbox-65f4f32366750e56df49295b7ecfa4646e582880.zip
fluxbox-65f4f32366750e56df49295b7ecfa4646e582880.tar.bz2
patch from Rob Stevens to add dragndrop-reordering of the tabs
disable title of the windowmenu when called from titlebar
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 310ba17..24d7181 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -616,7 +616,7 @@ void FluxboxWindow::shape() {
616 616
617 617
618/// attach a client to this window and destroy old window 618/// attach a client to this window and destroy old window
619void FluxboxWindow::attachClient(WinClient &client) { 619void FluxboxWindow::attachClient(WinClient &client, int x, int y) {
620 //!! TODO: check for isGroupable in client 620 //!! TODO: check for isGroupable in client
621 if (client.m_win == this) 621 if (client.m_win == this)
622 return; 622 return;
@@ -666,6 +666,8 @@ void FluxboxWindow::attachClient(WinClient &client) {
666 btn->setJustify(frame().theme().justify()); 666 btn->setJustify(frame().theme().justify());
667 m_labelbuttons[(*client_it)] = btn; 667 m_labelbuttons[(*client_it)] = btn;
668 frame().addLabelButton(*btn); 668 frame().addLabelButton(*btn);
669 if(x >= 0)
670 frame().moveLabelButtonTo(*btn, x ,y);
669 btn->show(); 671 btn->show();
670 // we need motion notify so we mask it 672 // we need motion notify so we mask it
671 btn->setEventMask(ExposureMask | ButtonPressMask | 673 btn->setEventMask(ExposureMask | ButtonPressMask |
@@ -2033,6 +2035,7 @@ void FluxboxWindow::popupMenu() {
2033 return; 2035 return;
2034 } 2036 }
2035 2037
2038 menu().disableTitle();
2036 int menu_y = frame().titlebar().height() + frame().titlebar().borderWidth(); 2039 int menu_y = frame().titlebar().height() + frame().titlebar().borderWidth();
2037 if (!decorations.titlebar) // if we don't have any titlebar 2040 if (!decorations.titlebar) // if we don't have any titlebar
2038 menu_y = 0; 2041 menu_y = 0;
@@ -3183,7 +3186,6 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) {
3183 3186
3184 int dest_x = 0, dest_y = 0; 3187 int dest_x = 0, dest_y = 0;
3185 Window child = 0; 3188 Window child = 0;
3186
3187 if (XTranslateCoordinates(display, parent().window(), 3189 if (XTranslateCoordinates(display, parent().window(),
3188 parent().window(), 3190 parent().window(),
3189 x, y, &dest_x, &dest_y, &child)) { 3191 x, y, &dest_x, &dest_y, &child)) {
@@ -3200,10 +3202,11 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) {
3200 attach_to_win = client->fbwindow(); 3202 attach_to_win = client->fbwindow();
3201 } 3203 }
3202 } 3204 }
3205
3203 if (attach_to_win != this && 3206 if (attach_to_win != this &&
3204 attach_to_win != 0 && attach_to_win->isTabable()) { 3207 attach_to_win != 0 && attach_to_win->isTabable()) {
3205 3208
3206 attach_to_win->attachClient(*old_attached); 3209 attach_to_win->attachClient(*old_attached,x,y );
3207 // we could be deleted here, DO NOT do anything else that alters this object 3210 // we could be deleted here, DO NOT do anything else that alters this object
3208 } else if (attach_to_win != this) { 3211 } else if (attach_to_win != this) {
3209 // disconnect client if we didn't drop on a window 3212 // disconnect client if we didn't drop on a window
@@ -3215,6 +3218,12 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) {
3215 client.m_win->move(frame().x() - m_last_resize_x + x, frame().y() - m_last_resize_y + y); 3218 client.m_win->move(frame().x() - m_last_resize_x + x, frame().y() - m_last_resize_y + y);
3216 3219
3217 } 3220 }
3221 else if(attach_to_win==this && attach_to_win->isTabable()) {
3222 //reording of tabs within a frame
3223 FbWinFrame *frame=&attach_to_win->frame();
3224 frame->moveLabelButtonTo(*m_labelbuttons[old_attached], x, y);
3225 }
3226
3218 } 3227 }
3219} 3228}
3220 3229