- switch(current_operation)
- {
- case SELECT:
- if(gui &&
- gui->is_event_win() &&
- allow_drag)
- {
- BC_ListBoxItem *item_return = 0;
- selection_number = get_cursor_item(data,
- top_level->cursor_x,
- top_level->cursor_y,
- &item_return);
-
- if(selection_number >= 0)
- {
-
- if (item_return->icon_vframe)
- {
- drag_popup = new BC_DragWindow(this,
- item_return->icon_vframe /*,
- get_abs_cursor_x(0) - item_return->icon_vframe->get_w() / 2,
- get_abs_cursor_y(0) - item_return->icon_vframe->get_h() / 2 */);
- }
- else
-// this probably works not!
- if (item_return->icon)
- {
- drag_popup = new BC_DragWindow(this,
- item_return->icon /*,
- get_abs_cursor_x(0) - item_return->icon->get_w() / 2,
- get_abs_cursor_y(0) - item_return->icon->get_h() / 2 */);
- }
- else
- {
- drag_popup = new BC_DragWindow(this,
- drag_icon_vframe /*,
- get_abs_cursor_x(0) - drag_icon_vframe->get_w() / 2,
- get_abs_cursor_y(0) - drag_icon_vframe->get_h() / 2 */);
- }
-
- current_operation = DRAG_ITEM;
- set_repeat(get_resources()->scroll_repeat);
- return 1;
+ switch( current_operation ) {
+ case SELECT:
+ if( gui && gui->is_event_win() && allow_drag ) {
+ BC_ListBoxItem *item_return = 0;
+ selection_number = get_cursor_item(data,
+ top_level->cursor_x,
+ top_level->cursor_y,
+ &item_return);
+
+ if( selection_number >= 0 ) {
+ int cx, cy;
+ get_abs_cursor(cx, cy);
+ if( item_return->icon_vframe ) {
+ drag_popup = new BC_DragWindow(this,
+ item_return->icon_vframe, cx, cy);