+++
** New minor mode `window-divider-mode' and options
-`window-divider-default-bottom-width' and
-`window-divider-default-right-width'.
+`window-divider-default-places', `window-divider-default-bottom-width'
+and `window-divider-default-right-width'.
+++
** New option `switch-to-buffer-in-dedicated-window' allows to customize
int *root_x,
int *root_y)
{
- Lisp_Object left, top;
+ Lisp_Object left, top, right, bottom;
EmacsView *view = FRAME_NS_VIEW (f);
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
NSPoint pt;
/* Start with user-specified or mouse position. */
left = Fcdr (Fassq (Qleft, parms));
top = Fcdr (Fassq (Qtop, parms));
+ right = Fcdr (Fassq (Qright, parms));
+ bottom = Fcdr (Fassq (Qbottom, parms));
- if (!INTEGERP (left) || !INTEGERP (top))
+ if ((!INTEGERP (left) && !INTEGERP (right))
+ || (!INTEGERP (top) && !INTEGERP (bottom)))
{
pt.x = dpyinfo->last_mouse_motion_x;
pt.y = dpyinfo->last_mouse_motion_y;
else
{
/* Absolute coordinates. */
- pt.x = XINT (left);
- pt.y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - XINT (top)
- - height;
+ pt.x = INTEGERP (left) ? XINT (left) : XINT (right);
+ pt.y = (x_display_pixel_height (FRAME_DISPLAY_INFO (f))
+ - (INTEGERP (top) ? XINT (top) : XINT (bottom))
+ - height);
}
/* Ensure in bounds. (Note, screen origin = lower left.) */
- if (INTEGERP (left))
+ if (INTEGERP (left) || INTEGERP (right))
*root_x = pt.x;
else if (pt.x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
/* Put it left justified on the screen -- it ought to fit that way. */
*root_x = 0;
- if (INTEGERP (top))
+ if (INTEGERP (top) || INTEGERP (bottom))
*root_y = pt.y;
else if (pt.y - XINT (dy) - height >= 0)
/* It fits below the pointer. */
means use the default timeout of 5 seconds.
If the list of frame parameters PARMS contains a `left' parameter,
-the tooltip is displayed at that x-position. Otherwise it is
-displayed at the mouse position, with offset DX added (default is 5 if
-DX isn't specified). Likewise for the y-position; if a `top' frame
-parameter is specified, it determines the y-position of the tooltip
-window, otherwise it is displayed at the mouse position, with offset
-DY added (default is -10).
+display the tooltip at that x-position. If the list of frame parameters
+PARMS contains no `left' but a `right' parameter, display the tooltip
+right-adjusted at that x-position. Otherwise display it at the
+x-position of the mouse, with offset DX added (default is 5 if DX isn't
+specified).
+
+Likewise for the y-position: If a `top' frame parameter is specified, it
+determines the position of the upper edge of the tooltip window. If a
+`bottom' parameter but no `top' frame parameter is specified, it
+determines the position of the lower edge of the tooltip window.
+Otherwise display the tooltip window at the y-position of the mouse,
+with offset DY added (default is -10).
A tooltip's maximum size is specified by `x-max-tooltip-size'.
Text larger than the specified size is clipped. */)
parameters for F. DX and DY are specified offsets from the current
location of the mouse. WIDTH and HEIGHT are the width and height
of the tooltip. Return coordinates relative to the root window of
- the display in *ROOT_X, and *ROOT_Y. */
+ the display in *ROOT_X and *ROOT_Y. */
static void
compute_tip_xy (struct frame *f,
Lisp_Object parms, Lisp_Object dx, Lisp_Object dy,
int width, int height, int *root_x, int *root_y)
{
- Lisp_Object left, top;
+ Lisp_Object left, top, right, bottom;
int min_x, min_y, max_x, max_y;
/* User-specified position? */
left = Fcdr (Fassq (Qleft, parms));
top = Fcdr (Fassq (Qtop, parms));
+ right = Fcdr (Fassq (Qright, parms));
+ bottom = Fcdr (Fassq (Qbottom, parms));
/* Move the tooltip window where the mouse pointer is. Resize and
show it. */
- if (!INTEGERP (left) || !INTEGERP (top))
+ if ((!INTEGERP (left) && !INTEGERP (right))
+ || (!INTEGERP (top) && !INTEGERP (bottom)))
{
POINT pt;
if (INTEGERP (top))
*root_y = XINT (top);
+ else if (INTEGERP (bottom))
+ *root_y = XINT (bottom) - height;
else if (*root_y + XINT (dy) <= min_y)
*root_y = min_y; /* Can happen for negative dy */
else if (*root_y + XINT (dy) + height <= max_y)
if (INTEGERP (left))
*root_x = XINT (left);
+ else if (INTEGERP (right))
+ *root_y = XINT (right) - width;
else if (*root_x + XINT (dx) <= min_x)
*root_x = 0; /* Can happen for negative dx */
else if (*root_x + XINT (dx) + width <= max_x)
means use the default timeout of 5 seconds.
If the list of frame parameters PARMS contains a `left' parameter,
-the tooltip is displayed at that x-position. Otherwise it is
-displayed at the mouse position, with offset DX added (default is 5 if
-DX isn't specified). Likewise for the y-position; if a `top' frame
-parameter is specified, it determines the y-position of the tooltip
-window, otherwise it is displayed at the mouse position, with offset
-DY added (default is -10).
+display the tooltip at that x-position. If the list of frame parameters
+PARMS contains no `left' but a `right' parameter, display the tooltip
+right-adjusted at that x-position. Otherwise display it at the
+x-position of the mouse, with offset DX added (default is 5 if DX isn't
+specified).
+
+Likewise for the y-position: If a `top' frame parameter is specified, it
+determines the position of the upper edge of the tooltip window. If a
+`bottom' parameter but no `top' frame parameter is specified, it
+determines the position of the lower edge of the tooltip window.
+Otherwise display the tooltip window at the y-position of the mouse,
+with offset DY added (default is -10).
A tooltip's maximum size is specified by `x-max-tooltip-size'.
Text larger than the specified size is clipped. */)
static void
compute_tip_xy (struct frame *f, Lisp_Object parms, Lisp_Object dx, Lisp_Object dy, int width, int height, int *root_x, int *root_y)
{
- Lisp_Object left, top;
+ Lisp_Object left, top, right, bottom;
int win_x, win_y;
Window root, child;
unsigned pmask;
/* User-specified position? */
left = Fcdr (Fassq (Qleft, parms));
top = Fcdr (Fassq (Qtop, parms));
+ right = Fcdr (Fassq (Qright, parms));
+ bottom = Fcdr (Fassq (Qbottom, parms));
/* Move the tooltip window where the mouse pointer is. Resize and
show it. */
- if (!INTEGERP (left) || !INTEGERP (top))
+ if ((!INTEGERP (left) && !INTEGERP (right))
+ || (!INTEGERP (top) && !INTEGERP (bottom)))
{
block_input ();
XQueryPointer (FRAME_X_DISPLAY (f), FRAME_DISPLAY_INFO (f)->root_window,
if (INTEGERP (top))
*root_y = XINT (top);
+ else if (INTEGERP (bottom))
+ *root_y = XINT (bottom) - height;
else if (*root_y + XINT (dy) <= 0)
*root_y = 0; /* Can happen for negative dy */
else if (*root_y + XINT (dy) + height
if (INTEGERP (left))
*root_x = XINT (left);
+ else if (INTEGERP (right))
+ *root_y = XINT (right) - width;
else if (*root_x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
else if (*root_x + XINT (dx) + width
Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil
means use the default timeout of 5 seconds.
-If the list of frame parameters PARMS contains a `left' parameters,
-the tooltip is displayed at that x-position. Otherwise it is
-displayed at the mouse position, with offset DX added (default is 5 if
-DX isn't specified). Likewise for the y-position; if a `top' frame
-parameter is specified, it determines the y-position of the tooltip
-window, otherwise it is displayed at the mouse position, with offset
-DY added (default is -10).
+If the list of frame parameters PARMS contains a `left' parameter,
+display the tooltip at that x-position. If the list of frame parameters
+PARMS contains no `left' but a `right' parameter, display the tooltip
+right-adjusted at that x-position. Otherwise display it at the
+x-position of the mouse, with offset DX added (default is 5 if DX isn't
+specified).
+
+Likewise for the y-position: If a `top' frame parameter is specified, it
+determines the position of the upper edge of the tooltip window. If a
+`bottom' parameter but no `top' frame parameter is specified, it
+determines the position of the lower edge of the tooltip window.
+Otherwise display the tooltip window at the y-position of the mouse,
+with offset DY added (default is -10).
A tooltip's maximum size is specified by `x-max-tooltip-size'.
Text larger than the specified size is clipped. */)