comparison src/frame-x.c @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents 74fd4e045ea6
children 697ef44129c6
comparison
equal deleted inserted replaced
403:9f011ab08d48 404:2f8bb876ab1d
48 #include "events.h" 48 #include "events.h"
49 #include "extents.h" 49 #include "extents.h"
50 #include "faces.h" 50 #include "faces.h"
51 #include "frame.h" 51 #include "frame.h"
52 #include "window.h" 52 #include "window.h"
53 #include "gutter.h"
53 54
54 #ifdef HAVE_DRAGNDROP 55 #ifdef HAVE_DRAGNDROP
55 #include "dragdrop.h" 56 #include "dragdrop.h"
56 #endif 57 #endif
57 58
1144 { 1145 {
1145 x_event.xbutton.x_root = lisp_event->event.button.x; /* this is wrong */ 1146 x_event.xbutton.x_root = lisp_event->event.button.x; /* this is wrong */
1146 x_event.xbutton.y_root = lisp_event->event.button.y; 1147 x_event.xbutton.y_root = lisp_event->event.button.y;
1147 } 1148 }
1148 modifier = lisp_event->event.button.modifiers; 1149 modifier = lisp_event->event.button.modifiers;
1149 if (modifier & MOD_SHIFT) state |= ShiftMask; 1150 if (modifier & XEMACS_MOD_SHIFT) state |= ShiftMask;
1150 if (modifier & MOD_CONTROL) state |= ControlMask; 1151 if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask;
1151 if (modifier & MOD_META) state |= xd->MetaMask; 1152 if (modifier & XEMACS_MOD_META) state |= xd->MetaMask;
1152 if (modifier & MOD_SUPER) state |= xd->SuperMask; 1153 if (modifier & XEMACS_MOD_SUPER) state |= xd->SuperMask;
1153 if (modifier & MOD_HYPER) state |= xd->HyperMask; 1154 if (modifier & XEMACS_MOD_HYPER) state |= xd->HyperMask;
1154 if (modifier & MOD_ALT) state |= xd->AltMask; 1155 if (modifier & XEMACS_MOD_ALT) state |= xd->AltMask;
1155 state |= Button1Mask << (lisp_event->event.button.button-1); 1156 state |= Button1Mask << (lisp_event->event.button.button-1);
1156 1157
1157 x_event.xbutton.state = state; 1158 x_event.xbutton.state = state;
1158 x_event.xbutton.button = lisp_event->event.button.button; 1159 x_event.xbutton.button = lisp_event->event.button.button;
1159 x_event.xkey.same_screen = True; 1160 x_event.xkey.same_screen = True;
1410 x_event.xbutton.x_root = lisp_event->event.button.x; /* this is wrong */ 1411 x_event.xbutton.x_root = lisp_event->event.button.x; /* this is wrong */
1411 x_event.xbutton.y_root = lisp_event->event.button.y; 1412 x_event.xbutton.y_root = lisp_event->event.button.y;
1412 } 1413 }
1413 1414
1414 modifier = lisp_event->event.button.modifiers; 1415 modifier = lisp_event->event.button.modifiers;
1415 if (modifier & MOD_SHIFT) state |= ShiftMask; 1416 if (modifier & XEMACS_MOD_SHIFT) state |= ShiftMask;
1416 if (modifier & MOD_CONTROL) state |= ControlMask; 1417 if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask;
1417 if (modifier & MOD_META) state |= xd->MetaMask; 1418 if (modifier & XEMACS_MOD_META) state |= xd->MetaMask;
1418 if (modifier & MOD_SUPER) state |= xd->SuperMask; 1419 if (modifier & XEMACS_MOD_SUPER) state |= xd->SuperMask;
1419 if (modifier & MOD_HYPER) state |= xd->HyperMask; 1420 if (modifier & XEMACS_MOD_HYPER) state |= xd->HyperMask;
1420 if (modifier & MOD_ALT) state |= xd->AltMask; 1421 if (modifier & XEMACS_MOD_ALT) state |= xd->AltMask;
1421 state |= Button1Mask << (lisp_event->event.button.button-1); 1422 state |= Button1Mask << (lisp_event->event.button.button-1);
1422 1423
1423 x_event.xbutton.state = state; 1424 x_event.xbutton.state = state;
1424 x_event.xbutton.button = lisp_event->event.button.button; 1425 x_event.xbutton.button = lisp_event->event.button.button;
1425 x_event.xkey.same_screen = True; 1426 x_event.xkey.same_screen = True;
1548 /* set the position of the frame's root window now. When the 1549 /* set the position of the frame's root window now. When the
1549 frame was created, the position was initialized to (0,0). */ 1550 frame was created, the position was initialized to (0,0). */
1550 { 1551 {
1551 struct window *win = XWINDOW (f->root_window); 1552 struct window *win = XWINDOW (f->root_window);
1552 1553
1553 WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f); 1554 WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
1554 WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f); 1555 + FRAME_LEFT_GUTTER_BOUNDS (f);
1556 WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f)
1557 + FRAME_TOP_GUTTER_BOUNDS (f);
1555 1558
1556 if (!NILP (f->minibuffer_window)) 1559 if (!NILP (f->minibuffer_window))
1557 { 1560 {
1558 win = XWINDOW (f->minibuffer_window); 1561 win = XWINDOW (f->minibuffer_window);
1559 WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f); 1562 WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
1563 + FRAME_LEFT_GUTTER_BOUNDS (f);
1560 } 1564 }
1561 } 1565 }
1562 1566
1563 #ifdef EXTERNAL_WIDGET 1567 #ifdef EXTERNAL_WIDGET
1564 /* If we're an external widget, then the size of the frame is predetermined 1568 /* If we're an external widget, then the size of the frame is predetermined