#include <sys/types.h>
#include <sys/stat.h>
-#ifndef VMS
#if 1 /* Used to be #ifdef EMACS_BITMAP_FILES, but this should always work. */
#include "bitmaps/gray.xbm"
#else
#include <X11/bitmaps/gray>
#endif
-#else
-#include "[.bitmaps]gray.xbm"
-#endif
#ifdef USE_GTK
#include "gtkutil.h"
}
+DEFUN ("x-wm-set-size-hint", Fx_wm_set_size_hint, Sx_wm_set_size_hint,
+ 0, 1, 0,
+ doc: /* Send the size hints for frame FRAME to the window manager.
+If FRAME is nil, use the selected frame. */)
+ (frame)
+ Lisp_Object frame;
+{
+ struct frame *f;
+ if (NILP (frame))
+ frame = selected_frame;
+ f = XFRAME (frame);
+ BLOCK_INPUT;
+ if (FRAME_X_P (f))
+ x_wm_set_size_hint (f, 0, 0);
+ UNBLOCK_INPUT;
+ return Qnil;
+}
+
DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
1, 1, 0,
doc: /* Make a new X window, which is called a "frame" in Emacs terms.
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (dpyinfo->width);
+ return make_number (x_display_pixel_width (dpyinfo));
}
DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (dpyinfo->height);
+ return make_number (x_display_pixel_height (dpyinfo));
}
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
/* x, y, width, height */
0, 0, 1, 1,
/* Border. */
- 1,
+ f->border_width,
CopyFromParent, InputOutput, CopyFromParent,
mask, &attrs);
UNBLOCK_INPUT;
*root_y = XINT (top);
else if (*root_y + XINT (dy) <= 0)
*root_y = 0; /* Can happen for negative dy */
- else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height)
+ else if (*root_y + XINT (dy) + height
+ <= x_display_pixel_height (FRAME_X_DISPLAY_INFO (f)))
/* It fits below the pointer */
- *root_y += XINT (dy);
+ *root_y += XINT (dy);
else if (height + XINT (dy) <= *root_y)
/* It fits above the pointer. */
*root_y -= height + XINT (dy);
*root_x = XINT (left);
else if (*root_x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
- else if (*root_x + XINT (dx) + width <= FRAME_X_DISPLAY_INFO (f)->width)
+ else if (*root_x + XINT (dx) + width
+ <= x_display_pixel_width (FRAME_X_DISPLAY_INFO (f)))
/* It fits to the right of the pointer. */
*root_x += XINT (dx);
else if (width + XINT (dx) <= *root_x)
if (FRAMEP (frame))
{
- Fdelete_frame (frame, Qnil);
+ delete_frame (frame, Qnil);
deleted = Qt;
#ifdef USE_LUCID
defsubr (&Sx_display_visual_class);
defsubr (&Sx_display_backing_store);
defsubr (&Sx_display_save_under);
+ defsubr (&Sx_wm_set_size_hint);
defsubr (&Sx_create_frame);
defsubr (&Sx_open_connection);
defsubr (&Sx_close_connection);