diff options
author | rathnor <rathnor> | 2004-06-29 12:41:23 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2004-06-29 12:41:23 (GMT) |
commit | 6afbecdadaa91e50851477c4918fce9cfbeaa207 (patch) | |
tree | 45e11934b7abb503ee297e5552d7ffce0bb8f343 | |
parent | df68d8d0b09df1aa26b17232cd8501ced20b2c11 (diff) | |
download | fluxbox-6afbecdadaa91e50851477c4918fce9cfbeaa207.zip fluxbox-6afbecdadaa91e50851477c4918fce9cfbeaa207.tar.bz2 |
fix rectangle drawing on attaching tabs
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/Window.cc | 21 |
2 files changed, 15 insertions, 9 deletions
@@ -1,5 +1,8 @@ | |||
1 | (Format: Year/Month/Day) | 1 | (Format: Year/Month/Day) |
2 | Changes for 0.9.10: | 2 | Changes for 0.9.10: |
3 | *04/06/29: | ||
4 | * Fix rectangle cleaning on attaching tabs (Simon) | ||
5 | Window.cc | ||
3 | *04/06/27: | 6 | *04/06/27: |
4 | * Fixed bug in systray (Henrik) | 7 | * Fixed bug in systray (Henrik) |
5 | (this fixes the problem with "sim" in systray) | 8 | (this fixes the problem with "sim" in systray) |
diff --git a/src/Window.cc b/src/Window.cc index b36ade7..f5952dc 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.291 2004/06/20 04:49:32 rathnor Exp $ | 25 | // $Id: Window.cc,v 1.292 2004/06/29 12:41:23 rathnor Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -3056,14 +3056,19 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) { | |||
3056 | if (m_attaching_tab == 0) | 3056 | if (m_attaching_tab == 0) |
3057 | return; | 3057 | return; |
3058 | 3058 | ||
3059 | ungrabPointer(CurrentTime); | ||
3060 | |||
3061 | parent().drawRectangle(screen().rootTheme().opGC(), | 3059 | parent().drawRectangle(screen().rootTheme().opGC(), |
3062 | m_last_move_x, m_last_move_y, | 3060 | m_last_move_x, m_last_move_y, |
3063 | m_labelbuttons[m_attaching_tab]->width(), | 3061 | m_labelbuttons[m_attaching_tab]->width(), |
3064 | m_labelbuttons[m_attaching_tab]->height()); | 3062 | m_labelbuttons[m_attaching_tab]->height()); |
3063 | |||
3064 | ungrabPointer(CurrentTime); | ||
3065 | |||
3065 | Fluxbox::instance()->ungrab(); | 3066 | Fluxbox::instance()->ungrab(); |
3066 | 3067 | ||
3068 | // make sure we clean up here, since this object may be deleted inside attachClient | ||
3069 | WinClient *old_attached = m_attaching_tab; | ||
3070 | m_attaching_tab = 0; | ||
3071 | |||
3067 | if (interrupted) | 3072 | if (interrupted) |
3068 | return; | 3073 | return; |
3069 | 3074 | ||
@@ -3089,21 +3094,19 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) { | |||
3089 | if (attach_to_win != this && | 3094 | if (attach_to_win != this && |
3090 | attach_to_win != 0 && attach_to_win->isTabable()) { | 3095 | attach_to_win != 0 && attach_to_win->isTabable()) { |
3091 | 3096 | ||
3092 | attach_to_win->attachClient(*m_attaching_tab); | 3097 | attach_to_win->attachClient(*old_attached); |
3093 | 3098 | // we could be deleted here, DO NOT do anything else that alters this object | |
3094 | } else if (attach_to_win != this) { | 3099 | } else if (attach_to_win != this) { |
3095 | // disconnect client if we didn't drop on a window | 3100 | // disconnect client if we didn't drop on a window |
3096 | WinClient &client = *m_attaching_tab; | 3101 | WinClient &client = *old_attached; |
3097 | detachClient(*m_attaching_tab); | 3102 | detachClient(*old_attached); |
3098 | // move window by relative amount of mouse movement | 3103 | // move window by relative amount of mouse movement |
3099 | // since just detached, move relative to old location | 3104 | // since just detached, move relative to old location |
3100 | if (client.m_win != 0) | 3105 | if (client.m_win != 0) |
3101 | client.m_win->move(frame().x() - m_last_resize_x + x, frame().y() - m_last_resize_y + y); | 3106 | client.m_win->move(frame().x() - m_last_resize_x + x, frame().y() - m_last_resize_y + y); |
3102 | 3107 | ||
3103 | } | 3108 | } |
3104 | |||
3105 | } | 3109 | } |
3106 | m_attaching_tab = 0; | ||
3107 | } | 3110 | } |
3108 | 3111 | ||
3109 | void FluxboxWindow::restore(WinClient *client, bool remap) { | 3112 | void FluxboxWindow::restore(WinClient *client, bool remap) { |