|
Karsten Hopp |
7f9fde |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
7f9fde |
Subject: Patch 7.3.299
|
|
Karsten Hopp |
7f9fde |
Fcc: outbox
|
|
Karsten Hopp |
7f9fde |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
7f9fde |
Mime-Version: 1.0
|
|
Karsten Hopp |
7f9fde |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
7f9fde |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
7f9fde |
------------
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
Patch 7.3.299
|
|
Karsten Hopp |
7f9fde |
Problem: Source code not in Vim style.
|
|
Karsten Hopp |
7f9fde |
Solution: Adjust the style. (Elias Diem)
|
|
Karsten Hopp |
7f9fde |
Files: src/gui_photon.c
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
*** ../vim-7.3.298/src/gui_photon.c 2011-09-07 18:58:24.000000000 +0200
|
|
Karsten Hopp |
7f9fde |
--- src/gui_photon.c 2011-09-07 19:02:59.000000000 +0200
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 535,547 ****
|
|
Karsten Hopp |
7f9fde |
&src_taken,
|
|
Karsten Hopp |
7f9fde |
buf,
|
|
Karsten Hopp |
7f9fde |
6,
|
|
Karsten Hopp |
7f9fde |
! &dst_made );
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! add_to_input_buf( buf, dst_made );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! add_to_input_buf( string, len );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
return Pt_CONSUME;
|
|
Karsten Hopp |
7f9fde |
--- 535,547 ----
|
|
Karsten Hopp |
7f9fde |
&src_taken,
|
|
Karsten Hopp |
7f9fde |
buf,
|
|
Karsten Hopp |
7f9fde |
6,
|
|
Karsten Hopp |
7f9fde |
! &dst_made);
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! add_to_input_buf(buf, dst_made);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! add_to_input_buf(string, len);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
return Pt_CONSUME;
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 549,579 ****
|
|
Karsten Hopp |
7f9fde |
len = 0;
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
ch = key->key_cap;
|
|
Karsten Hopp |
7f9fde |
! if( ch < 0xff )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
/* FIXME: is this the right thing to do? */
|
|
Karsten Hopp |
7f9fde |
! if( modifiers & MOD_MASK_CTRL )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
modifiers &= ~MOD_MASK_CTRL;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( ( ch >= 'a' && ch <= 'z' ) ||
|
|
Karsten Hopp |
7f9fde |
ch == '[' ||
|
|
Karsten Hopp |
7f9fde |
ch == ']' ||
|
|
Karsten Hopp |
7f9fde |
! ch == '\\' )
|
|
Karsten Hopp |
7f9fde |
! ch = Ctrl_chr( ch );
|
|
Karsten Hopp |
7f9fde |
! else if( ch == '2' )
|
|
Karsten Hopp |
7f9fde |
ch = NUL;
|
|
Karsten Hopp |
7f9fde |
! else if( ch == '6' )
|
|
Karsten Hopp |
7f9fde |
ch = 0x1e;
|
|
Karsten Hopp |
7f9fde |
! else if( ch == '-' )
|
|
Karsten Hopp |
7f9fde |
ch = 0x1f;
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOD_MASK_CTRL;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( modifiers & MOD_MASK_ALT )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! ch = Meta( ch );
|
|
Karsten Hopp |
7f9fde |
modifiers &= ~MOD_MASK_ALT;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
--- 549,579 ----
|
|
Karsten Hopp |
7f9fde |
len = 0;
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
ch = key->key_cap;
|
|
Karsten Hopp |
7f9fde |
! if (ch < 0xff)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
/* FIXME: is this the right thing to do? */
|
|
Karsten Hopp |
7f9fde |
! if (modifiers & MOD_MASK_CTRL)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
modifiers &= ~MOD_MASK_CTRL;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if ((ch >= 'a' && ch <= 'z') ||
|
|
Karsten Hopp |
7f9fde |
ch == '[' ||
|
|
Karsten Hopp |
7f9fde |
ch == ']' ||
|
|
Karsten Hopp |
7f9fde |
! ch == '\\')
|
|
Karsten Hopp |
7f9fde |
! ch = Ctrl_chr(ch);
|
|
Karsten Hopp |
7f9fde |
! else if (ch == '2')
|
|
Karsten Hopp |
7f9fde |
ch = NUL;
|
|
Karsten Hopp |
7f9fde |
! else if (ch == '6')
|
|
Karsten Hopp |
7f9fde |
ch = 0x1e;
|
|
Karsten Hopp |
7f9fde |
! else if (ch == '-')
|
|
Karsten Hopp |
7f9fde |
ch = 0x1f;
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOD_MASK_CTRL;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (modifiers & MOD_MASK_ALT)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! ch = Meta(ch);
|
|
Karsten Hopp |
7f9fde |
modifiers &= ~MOD_MASK_ALT;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 586,604 ****
|
|
Karsten Hopp |
7f9fde |
modifiers &= ~MOD_MASK_SHIFT;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! ch = simplify_key( ch, &modifiers );
|
|
Karsten Hopp |
7f9fde |
! if( modifiers )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = CSI;
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = KS_MODIFIER;
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = modifiers;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( IS_SPECIAL( ch ) )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = CSI;
|
|
Karsten Hopp |
7f9fde |
! string[ len++ ] = K_SECOND( ch );
|
|
Karsten Hopp |
7f9fde |
! string[ len++ ] = K_THIRD( ch );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
--- 586,604 ----
|
|
Karsten Hopp |
7f9fde |
modifiers &= ~MOD_MASK_SHIFT;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! ch = simplify_key(ch, &modifiers);
|
|
Karsten Hopp |
7f9fde |
! if (modifiers)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = CSI;
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = KS_MODIFIER;
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = modifiers;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (IS_SPECIAL(ch))
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = CSI;
|
|
Karsten Hopp |
7f9fde |
! string[ len++ ] = K_SECOND(ch);
|
|
Karsten Hopp |
7f9fde |
! string[ len++ ] = K_THIRD(ch);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 619,627 ****
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = KE_CSI;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( len > 0 )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! add_to_input_buf( string, len );
|
|
Karsten Hopp |
7f9fde |
return Pt_CONSUME;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
--- 619,627 ----
|
|
Karsten Hopp |
7f9fde |
string[ len++ ] = KE_CSI;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (len > 0)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! add_to_input_buf(string, len);
|
|
Karsten Hopp |
7f9fde |
return Pt_CONSUME;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 630,646 ****
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
static int
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_mouse( PtWidget_t *widget, void *data, PtCallbackInfo_t *info )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
PhPointerEvent_t *pointer;
|
|
Karsten Hopp |
7f9fde |
PhRect_t *pos;
|
|
Karsten Hopp |
7f9fde |
int button = 0, repeated_click, modifiers = 0x0;
|
|
Karsten Hopp |
7f9fde |
short mouse_x, mouse_y;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! pointer = PhGetData( info->event );
|
|
Karsten Hopp |
7f9fde |
! pos = PhGetRects( info->event );
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! gui_mch_mousehide( MOUSE_SHOW );
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/*
|
|
Karsten Hopp |
7f9fde |
* Coordinates need to be relative to the base window,
|
|
Karsten Hopp |
7f9fde |
--- 630,646 ----
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
static int
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_mouse(PtWidget_t *widget, void *data, PtCallbackInfo_t *info)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
PhPointerEvent_t *pointer;
|
|
Karsten Hopp |
7f9fde |
PhRect_t *pos;
|
|
Karsten Hopp |
7f9fde |
int button = 0, repeated_click, modifiers = 0x0;
|
|
Karsten Hopp |
7f9fde |
short mouse_x, mouse_y;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! pointer = PhGetData(info->event);
|
|
Karsten Hopp |
7f9fde |
! pos = PhGetRects(info->event);
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! gui_mch_mousehide(MOUSE_SHOW);
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/*
|
|
Karsten Hopp |
7f9fde |
* Coordinates need to be relative to the base window,
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 649,675 ****
|
|
Karsten Hopp |
7f9fde |
mouse_x = pos->ul.x + gui.border_width;
|
|
Karsten Hopp |
7f9fde |
mouse_y = pos->ul.y + gui.border_width;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( info->event->type == Ph_EV_PTR_MOTION_NOBUTTON )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! gui_mouse_moved( mouse_x, mouse_y );
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( pointer->key_mods & Pk_KM_Shift )
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOUSE_SHIFT;
|
|
Karsten Hopp |
7f9fde |
! if( pointer->key_mods & Pk_KM_Ctrl )
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOUSE_CTRL;
|
|
Karsten Hopp |
7f9fde |
! if( pointer->key_mods & Pk_KM_Alt )
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOUSE_ALT;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/*
|
|
Karsten Hopp |
7f9fde |
* FIXME More than one button may be involved, but for
|
|
Karsten Hopp |
7f9fde |
* now just deal with one
|
|
Karsten Hopp |
7f9fde |
*/
|
|
Karsten Hopp |
7f9fde |
! if( pointer->buttons & Ph_BUTTON_SELECT )
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_LEFT;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( pointer->buttons & Ph_BUTTON_MENU )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_RIGHT;
|
|
Karsten Hopp |
7f9fde |
/* Need the absolute coordinates for the popup menu */
|
|
Karsten Hopp |
7f9fde |
--- 649,675 ----
|
|
Karsten Hopp |
7f9fde |
mouse_x = pos->ul.x + gui.border_width;
|
|
Karsten Hopp |
7f9fde |
mouse_y = pos->ul.y + gui.border_width;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (info->event->type == Ph_EV_PTR_MOTION_NOBUTTON)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! gui_mouse_moved(mouse_x, mouse_y);
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (pointer->key_mods & Pk_KM_Shift)
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOUSE_SHIFT;
|
|
Karsten Hopp |
7f9fde |
! if (pointer->key_mods & Pk_KM_Ctrl)
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOUSE_CTRL;
|
|
Karsten Hopp |
7f9fde |
! if (pointer->key_mods & Pk_KM_Alt)
|
|
Karsten Hopp |
7f9fde |
modifiers |= MOUSE_ALT;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/*
|
|
Karsten Hopp |
7f9fde |
* FIXME More than one button may be involved, but for
|
|
Karsten Hopp |
7f9fde |
* now just deal with one
|
|
Karsten Hopp |
7f9fde |
*/
|
|
Karsten Hopp |
7f9fde |
! if (pointer->buttons & Ph_BUTTON_SELECT)
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_LEFT;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (pointer->buttons & Ph_BUTTON_MENU)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_RIGHT;
|
|
Karsten Hopp |
7f9fde |
/* Need the absolute coordinates for the popup menu */
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 677,705 ****
|
|
Karsten Hopp |
7f9fde |
abs_mouse.y = pointer->pos.y;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( pointer->buttons & Ph_BUTTON_ADJUST )
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_MIDDLE;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/* Catch a real release (not phantom or other releases */
|
|
Karsten Hopp |
7f9fde |
! if( info->event->type == Ph_EV_BUT_RELEASE )
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_RELEASE;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( info->event->type & Ph_EV_PTR_MOTION_BUTTON )
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_DRAG;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
#if 0
|
|
Karsten Hopp |
7f9fde |
/* Vim doesn't use button repeats */
|
|
Karsten Hopp |
7f9fde |
! if( info->event->type & Ph_EV_BUT_REPEAT )
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_DRAG;
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/* Don't do anything if it is one of the phantom mouse release events */
|
|
Karsten Hopp |
7f9fde |
! if( ( button != MOUSE_RELEASE ) ||
|
|
Karsten Hopp |
7f9fde |
! ( info->event->subtype == Ph_EV_RELEASE_REAL ) )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
repeated_click = (pointer->click_count >= 2) ? TRUE : FALSE;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! gui_send_mouse_event( button , mouse_x, mouse_y, repeated_click, modifiers );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
--- 677,705 ----
|
|
Karsten Hopp |
7f9fde |
abs_mouse.y = pointer->pos.y;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (pointer->buttons & Ph_BUTTON_ADJUST)
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_MIDDLE;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/* Catch a real release (not phantom or other releases */
|
|
Karsten Hopp |
7f9fde |
! if (info->event->type == Ph_EV_BUT_RELEASE)
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_RELEASE;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (info->event->type & Ph_EV_PTR_MOTION_BUTTON)
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_DRAG;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
#if 0
|
|
Karsten Hopp |
7f9fde |
/* Vim doesn't use button repeats */
|
|
Karsten Hopp |
7f9fde |
! if (info->event->type & Ph_EV_BUT_REPEAT)
|
|
Karsten Hopp |
7f9fde |
button = MOUSE_DRAG;
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/* Don't do anything if it is one of the phantom mouse release events */
|
|
Karsten Hopp |
7f9fde |
! if ((button != MOUSE_RELEASE) ||
|
|
Karsten Hopp |
7f9fde |
! (info->event->subtype == Ph_EV_RELEASE_REAL))
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
repeated_click = (pointer->click_count >= 2) ? TRUE : FALSE;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! gui_send_mouse_event(button , mouse_x, mouse_y, repeated_click, modifiers);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 707,741 ****
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/* Handle a focus change of the PtRaw widget */
|
|
Karsten Hopp |
7f9fde |
static int
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_focus( PtWidget_t *widget, void *data, PtCallbackInfo_t *info )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! if( info->reason == Pt_CB_LOST_FOCUS )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! PtRemoveEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_mouse, NULL );
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! gui_mch_mousehide( MOUSE_SHOW );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! PtAddEventHandler( gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_mouse, NULL );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
static void
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_raw_draw( PtWidget_t *widget, PhTile_t *damage )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
PhRect_t *r;
|
|
Karsten Hopp |
7f9fde |
PhPoint_t offset;
|
|
Karsten Hopp |
7f9fde |
PhPoint_t translation;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if( is_ignore_draw == TRUE )
|
|
Karsten Hopp |
7f9fde |
return;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PtSuperClassDraw( PtBasic, widget, damage );
|
|
Karsten Hopp |
7f9fde |
! PgGetTranslation( &translation );
|
|
Karsten Hopp |
7f9fde |
PgClearTranslation();
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
#if 0
|
|
Karsten Hopp |
7f9fde |
--- 707,741 ----
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/* Handle a focus change of the PtRaw widget */
|
|
Karsten Hopp |
7f9fde |
static int
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_focus(PtWidget_t *widget, void *data, PtCallbackInfo_t *info)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! if (info->reason == Pt_CB_LOST_FOCUS)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! PtRemoveEventHandler(gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_mouse, NULL);
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! gui_mch_mousehide(MOUSE_SHOW);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
else
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! PtAddEventHandler(gui.vimTextArea, Ph_EV_PTR_MOTION_NOBUTTON,
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_mouse, NULL);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
static void
|
|
Karsten Hopp |
7f9fde |
! gui_ph_handle_raw_draw(PtWidget_t *widget, PhTile_t *damage)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
PhRect_t *r;
|
|
Karsten Hopp |
7f9fde |
PhPoint_t offset;
|
|
Karsten Hopp |
7f9fde |
PhPoint_t translation;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! if (is_ignore_draw == TRUE)
|
|
Karsten Hopp |
7f9fde |
return;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PtSuperClassDraw(PtBasic, widget, damage);
|
|
Karsten Hopp |
7f9fde |
! PgGetTranslation(&translation);
|
|
Karsten Hopp |
7f9fde |
PgClearTranslation();
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
#if 0
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 750,770 ****
|
|
Karsten Hopp |
7f9fde |
out_flush();
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PtWidgetOffset( widget, &offset );
|
|
Karsten Hopp |
7f9fde |
! PhTranslatePoint( &offset, PtWidgetPos( gui.vimTextArea, NULL ) );
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
#if 1
|
|
Karsten Hopp |
7f9fde |
/* Redraw individual damage regions */
|
|
Karsten Hopp |
7f9fde |
! if( damage->next != NULL )
|
|
Karsten Hopp |
7f9fde |
damage = damage->next;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! while( damage != NULL )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
r = &damage->rect;
|
|
Karsten Hopp |
7f9fde |
gui_redraw(
|
|
Karsten Hopp |
7f9fde |
r->ul.x - offset.x, r->ul.y - offset.y,
|
|
Karsten Hopp |
7f9fde |
r->lr.x - r->ul.x + 1,
|
|
Karsten Hopp |
7f9fde |
! r->lr.y - r->ul.y + 1 );
|
|
Karsten Hopp |
7f9fde |
damage = damage->next;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
#else
|
|
Karsten Hopp |
7f9fde |
--- 750,770 ----
|
|
Karsten Hopp |
7f9fde |
out_flush();
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PtWidgetOffset(widget, &offset);
|
|
Karsten Hopp |
7f9fde |
! PhTranslatePoint(&offset, PtWidgetPos(gui.vimTextArea, NULL));
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
#if 1
|
|
Karsten Hopp |
7f9fde |
/* Redraw individual damage regions */
|
|
Karsten Hopp |
7f9fde |
! if (damage->next != NULL)
|
|
Karsten Hopp |
7f9fde |
damage = damage->next;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! while(damage != NULL)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
r = &damage->rect;
|
|
Karsten Hopp |
7f9fde |
gui_redraw(
|
|
Karsten Hopp |
7f9fde |
r->ul.x - offset.x, r->ul.y - offset.y,
|
|
Karsten Hopp |
7f9fde |
r->lr.x - r->ul.x + 1,
|
|
Karsten Hopp |
7f9fde |
! r->lr.y - r->ul.y + 1);
|
|
Karsten Hopp |
7f9fde |
damage = damage->next;
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
#else
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 773,796 ****
|
|
Karsten Hopp |
7f9fde |
gui_redraw(
|
|
Karsten Hopp |
7f9fde |
r->ul.x - offset.x, r->ul.y - offset.y,
|
|
Karsten Hopp |
7f9fde |
r->lr.x - r->ul.x + 1,
|
|
Karsten Hopp |
7f9fde |
! r->lr.y - r->ul.y + 1 );
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PgSetTranslation( &translation, 0 );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
static int
|
|
Karsten Hopp |
7f9fde |
gui_ph_handle_pulldown_menu(
|
|
Karsten Hopp |
7f9fde |
PtWidget_t *widget,
|
|
Karsten Hopp |
7f9fde |
void *data,
|
|
Karsten Hopp |
7f9fde |
! PtCallbackInfo_t *info )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! if( data != NULL )
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
vimmenu_T *menu = (vimmenu_T *) data;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PtPositionMenu( menu->submenu_id, NULL );
|
|
Karsten Hopp |
7f9fde |
! PtRealizeWidget( menu->submenu_id );
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
--- 773,796 ----
|
|
Karsten Hopp |
7f9fde |
gui_redraw(
|
|
Karsten Hopp |
7f9fde |
r->ul.x - offset.x, r->ul.y - offset.y,
|
|
Karsten Hopp |
7f9fde |
r->lr.x - r->ul.x + 1,
|
|
Karsten Hopp |
7f9fde |
! r->lr.y - r->ul.y + 1);
|
|
Karsten Hopp |
7f9fde |
#endif
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PgSetTranslation(&translation, 0);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
static int
|
|
Karsten Hopp |
7f9fde |
gui_ph_handle_pulldown_menu(
|
|
Karsten Hopp |
7f9fde |
PtWidget_t *widget,
|
|
Karsten Hopp |
7f9fde |
void *data,
|
|
Karsten Hopp |
7f9fde |
! PtCallbackInfo_t *info)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
! if (data != NULL)
|
|
Karsten Hopp |
7f9fde |
{
|
|
Karsten Hopp |
7f9fde |
vimmenu_T *menu = (vimmenu_T *) data;
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
! PtPositionMenu(menu->submenu_id, NULL);
|
|
Karsten Hopp |
7f9fde |
! PtRealizeWidget(menu->submenu_id);
|
|
Karsten Hopp |
7f9fde |
}
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
return Pt_CONTINUE;
|
|
Karsten Hopp |
7f9fde |
*** ../vim-7.3.298/src/version.c 2011-09-07 18:58:24.000000000 +0200
|
|
Karsten Hopp |
7f9fde |
--- src/version.c 2011-09-07 19:01:17.000000000 +0200
|
|
Karsten Hopp |
7f9fde |
***************
|
|
Karsten Hopp |
7f9fde |
*** 711,712 ****
|
|
Karsten Hopp |
7f9fde |
--- 711,714 ----
|
|
Karsten Hopp |
7f9fde |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
7f9fde |
+ /**/
|
|
Karsten Hopp |
7f9fde |
+ 299,
|
|
Karsten Hopp |
7f9fde |
/**/
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
--
|
|
Karsten Hopp |
7f9fde |
The only way the average employee can speak to an executive is by taking a
|
|
Karsten Hopp |
7f9fde |
second job as a golf caddie.
|
|
Karsten Hopp |
7f9fde |
(Scott Adams - The Dilbert principle)
|
|
Karsten Hopp |
7f9fde |
|
|
Karsten Hopp |
7f9fde |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
7f9fde |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
7f9fde |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
7f9fde |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|