From e0ae266bcc24494245ec5027ec3e28ddfdfeec95 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Tue, 25 Jan 2005 14:45:15 +0000 Subject: [PATCH] hmmz, i forgot to remove one unnecessary check. * src/Frame_Resizer_Base.cc: hmmz, i forgot to remove one unnecessary check. --- ChangeLog | 4 ++++ src/Frame_Resizer_Base.cc | 29 ++++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index abbeff08..8d13d05e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-01-25 Bart Hakvoort + + * src/Frame_Resizer_Base.cc: hmmz, i forgot to remove one unnecessary check. + 2005-01-25 Bart Hakvoort * include/Frame_Resizer_Base.h, diff --git a/src/Frame_Resizer_Base.cc b/src/Frame_Resizer_Base.cc index c673dd93..c35578ee 100644 --- a/src/Frame_Resizer_Base.cc +++ b/src/Frame_Resizer_Base.cc @@ -141,20 +141,6 @@ bool Frame_Resizer_Base::drawingarea_on_expose( GdkEventExpose * ev ) bool Frame_Resizer_Base::drawingarea_on_mouse_motion( GdkEventMotion *ev ) { - if ( ! GRIP_LEFT && ! GRIP_RIGHT && ! GRIP_MOVE ) //no need to check this while resizing or moving - { - //check if pointer is over a gripper - if ( ! fixed_start && ev ->x >= X_START -10 && ev ->x <= X_START && ev ->y >= 5 && ev ->y <= 45 ) //left grip - drawingarea .get_parent_window( ) ->set_cursor( *cursor_resize ) ; - else if ( ev ->x >= X_END && ev ->x <= X_END + 10 && ev ->y >= 5 && ev ->y <= 45 ) //right grip - drawingarea .get_parent_window( ) ->set_cursor( *cursor_resize ) ; - else if ( ! fixed_start && ev ->x >= X_START && ev ->x <= X_END ) //move grip - drawingarea .get_parent_window( ) ->set_cursor( *cursor_move ) ; - else //normal pointer - drawingarea .get_parent_window( ) ->set_cursor( *cursor_normal ) ; - } - - //here's where the real work is done ;-) if ( GRIP_LEFT || GRIP_RIGHT || GRIP_MOVE ) { if ( GRIP_LEFT && ev ->x >= 10 && ev ->x <= X_END - USED - BORDER * 2 && (X_END - ev ->x) <= MAX_SIZE && (X_END - ev ->x) >= MIN_SIZE ) @@ -177,7 +163,7 @@ bool Frame_Resizer_Base::drawingarea_on_mouse_motion( GdkEventMotion *ev ) if ( temp_x >= 10 && temp_y <= 526 ) { X_START = temp_x ; - X_END = temp_y ; + X_END = temp_y ; } X_START_MOVE = static_cast ( ev ->x ) ; @@ -187,6 +173,19 @@ bool Frame_Resizer_Base::drawingarea_on_mouse_motion( GdkEventMotion *ev ) Draw_Partition( ) ; } + + else + { + //check if pointer is over a gripper + if ( ! fixed_start && ev ->x >= X_START -10 && ev ->x <= X_START && ev ->y >= 5 && ev ->y <= 45 ) //left grip + drawingarea .get_parent_window( ) ->set_cursor( *cursor_resize ) ; + else if ( ev ->x >= X_END && ev ->x <= X_END + 10 && ev ->y >= 5 && ev ->y <= 45 ) //right grip + drawingarea .get_parent_window( ) ->set_cursor( *cursor_resize ) ; + else if ( ! fixed_start && ev ->x >= X_START && ev ->x <= X_END ) //move grip + drawingarea .get_parent_window( ) ->set_cursor( *cursor_move ) ; + else //normal pointer + drawingarea .get_parent_window( ) ->set_cursor( *cursor_normal ) ; + } return true; }