/[emacs]/emacs/src/macterm.c
ViewVC logotype

Diff of /emacs/src/macterm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.2.12 by miles, Tue May 11 02:38:27 2004 UTC revision 1.3.2.13 by miles, Tue Jul 6 09:14:36 2004 UTC
# Line 1210  x_flush (f) Line 1210  x_flush (f)
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 */
# Line 1410  static void Line 1410  static void
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    
# Line 7033  static int Line 7033  static int
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)
# Line 7052  mac_event_to_emacs_modifiers (EventRef e Line 7052  mac_event_to_emacs_modifiers (EventRef e
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);
# Line 7071  mac_get_mouse_btn (EventRef ref) Line 7071  mac_get_mouse_btn (EventRef ref)
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;
# Line 8227  XTread_socket (int sd, int expected, str Line 8227  XTread_socket (int sd, int expected, str
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;
# Line 8312  XTread_socket (int sd, int expected, str Line 8312  XTread_socket (int sd, int expected, str
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)
# Line 8319  XTread_socket (int sd, int expected, str Line 8321  XTread_socket (int sd, int expected, str
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
# Line 9024  mac_check_for_quit_char () Line 9026  mac_check_for_quit_char ()
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);

Legend:
Removed from v.1.3.2.12  
changed lines
  Added in v.1.3.2.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26