1210 |
FOR_EACH_FRAME (rest, frame) |
FOR_EACH_FRAME (rest, frame) |
1211 |
x_flush (XFRAME (frame)); |
x_flush (XFRAME (frame)); |
1212 |
} |
} |
1213 |
else if (FRAME_X_P (f)) |
else if (FRAME_MAC_P (f)) |
1214 |
XFlush (FRAME_MAC_DISPLAY (f)); |
XFlush (FRAME_MAC_DISPLAY (f)); |
1215 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
1216 |
#endif /* TARGET_API_MAC_CARBON */ |
#endif /* TARGET_API_MAC_CARBON */ |
1410 |
XTframe_up_to_date (f) |
XTframe_up_to_date (f) |
1411 |
struct frame *f; |
struct frame *f; |
1412 |
{ |
{ |
1413 |
if (FRAME_X_P (f)) |
if (FRAME_MAC_P (f)) |
1414 |
{ |
{ |
1415 |
struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); |
struct mac_display_info *dpyinfo = FRAME_MAC_DISPLAY_INFO (f); |
1416 |
|
|
7033 |
mac_get_emulated_btn ( UInt32 modifiers ) |
mac_get_emulated_btn ( UInt32 modifiers ) |
7034 |
{ |
{ |
7035 |
int result = 0; |
int result = 0; |
7036 |
if (Vmac_emulate_three_button_mouse != Qnil) { |
if (!NILP (Vmac_emulate_three_button_mouse)) { |
7037 |
int cmdIs3 = (Vmac_emulate_three_button_mouse != Qreverse); |
int cmdIs3 = !EQ (Vmac_emulate_three_button_mouse, Qreverse); |
7038 |
if (modifiers & controlKey) |
if (modifiers & controlKey) |
7039 |
result = cmdIs3 ? 2 : 1; |
result = cmdIs3 ? 2 : 1; |
7040 |
else if (modifiers & optionKey) |
else if (modifiers & optionKey) |
7052 |
UInt32 mods = 0; |
UInt32 mods = 0; |
7053 |
GetEventParameter (eventRef, kEventParamKeyModifiers, typeUInt32, NULL, |
GetEventParameter (eventRef, kEventParamKeyModifiers, typeUInt32, NULL, |
7054 |
sizeof (UInt32), NULL, &mods); |
sizeof (UInt32), NULL, &mods); |
7055 |
if (Vmac_emulate_three_button_mouse != Qnil && |
if (!NILP (Vmac_emulate_three_button_mouse) && |
7056 |
GetEventClass(eventRef) == kEventClassMouse) |
GetEventClass(eventRef) == kEventClassMouse) |
7057 |
{ |
{ |
7058 |
mods &= ~(optionKey & cmdKey); |
mods &= ~(optionKey & cmdKey); |
7071 |
switch (result) |
switch (result) |
7072 |
{ |
{ |
7073 |
case kEventMouseButtonPrimary: |
case kEventMouseButtonPrimary: |
7074 |
if (Vmac_emulate_three_button_mouse == Qnil) |
if (NILP (Vmac_emulate_three_button_mouse)) |
7075 |
return 0; |
return 0; |
7076 |
else { |
else { |
7077 |
UInt32 mods = 0; |
UInt32 mods = 0; |
8227 |
inev.timestamp = er.when * (1000 / 60); |
inev.timestamp = er.when * (1000 / 60); |
8228 |
/* ticks to milliseconds */ |
/* ticks to milliseconds */ |
8229 |
|
|
8230 |
XSETINT (inev.x, tracked_scroll_bar->left + 2); |
XSETINT (inev.x, XFASTINT (tracked_scroll_bar->left) + 2); |
8231 |
XSETINT (inev.y, mouse_loc.v - 24); |
XSETINT (inev.y, mouse_loc.v - 24); |
8232 |
tracked_scroll_bar->dragging = Qnil; |
tracked_scroll_bar->dragging = Qnil; |
8233 |
mouse_tracking_in_progress = mouse_tracking_none; |
mouse_tracking_in_progress = mouse_tracking_none; |
8312 |
else |
else |
8313 |
{ |
{ |
8314 |
Lisp_Object window; |
Lisp_Object window; |
8315 |
|
int x = mouse_loc.h; |
8316 |
|
int y = mouse_loc.v; |
8317 |
|
|
8318 |
XSETFRAME (inev.frame_or_window, mwp->mFP); |
XSETFRAME (inev.frame_or_window, mwp->mFP); |
8319 |
if (er.what == mouseDown) |
if (er.what == mouseDown) |
8321 |
= mouse_tracking_mouse_movement; |
= mouse_tracking_mouse_movement; |
8322 |
else |
else |
8323 |
mouse_tracking_in_progress = mouse_tracking_none; |
mouse_tracking_in_progress = mouse_tracking_none; |
8324 |
window = window_from_coordinates (mwp->mFP, inev.x, inev.y, 0, 0, 0, 1); |
window = window_from_coordinates (mwp->mFP, x, y, 0, 0, 0, 1); |
8325 |
|
|
8326 |
if (EQ (window, mwp->mFP->tool_bar_window)) |
if (EQ (window, mwp->mFP->tool_bar_window)) |
8327 |
{ |
{ |
8328 |
if (er.what == mouseDown) |
if (er.what == mouseDown) |
8329 |
handle_tool_bar_click (mwp->mFP, inev.x, inev.y, 1, 0); |
handle_tool_bar_click (mwp->mFP, x, y, 1, 0); |
8330 |
else |
else |
8331 |
handle_tool_bar_click (mwp->mFP, inev.x, inev.y, 0, |
handle_tool_bar_click (mwp->mFP, x, y, 0, |
8332 |
#if USE_CARBON_EVENTS |
#if USE_CARBON_EVENTS |
8333 |
mac_event_to_emacs_modifiers (eventRef) |
mac_event_to_emacs_modifiers (eventRef) |
8334 |
#else |
#else |
9026 |
EVENT_INIT (e); |
EVENT_INIT (e); |
9027 |
e.kind = ASCII_KEYSTROKE_EVENT; |
e.kind = ASCII_KEYSTROKE_EVENT; |
9028 |
e.code = quit_char; |
e.code = quit_char; |
9029 |
e.arg = NULL; |
e.arg = Qnil; |
9030 |
e.modifiers = NULL; |
e.modifiers = NULL; |
9031 |
e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60); |
e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60); |
9032 |
XSETFRAME (e.frame_or_window, mwp->mFP); |
XSETFRAME (e.frame_or_window, mwp->mFP); |