summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c41
1 files changed, 27 insertions, 14 deletions
diff --git a/src/xfns.c b/src/xfns.c
index f5e3c0c62e5..5b3f8ffe552 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */
#include "systime.h"
#include "termhooks.h"
#include "atimer.h"
+#include "termchar.h"
#ifdef HAVE_X_WINDOWS
@@ -1759,10 +1760,10 @@ x_set_scroll_bar_foreground (f, value, oldval)
if (FRAME_X_WINDOW (f) && FRAME_VISIBLE_P (f))
{
/* Remove all scroll bars because they have wrong colors. */
- if (condemn_scroll_bars_hook)
- (*condemn_scroll_bars_hook) (f);
- if (judge_scroll_bars_hook)
- (*judge_scroll_bars_hook) (f);
+ if (FRAME_DISPLAY (f)->condemn_scroll_bars_hook)
+ (*FRAME_DISPLAY (f)->condemn_scroll_bars_hook) (f);
+ if (FRAME_DISPLAY (f)->judge_scroll_bars_hook)
+ (*FRAME_DISPLAY (f)->judge_scroll_bars_hook) (f);
update_face_from_frame_parameter (f, Qscroll_bar_foreground, value);
redraw_frame (f);
@@ -1808,10 +1809,10 @@ x_set_scroll_bar_background (f, value, oldval)
if (FRAME_X_WINDOW (f) && FRAME_VISIBLE_P (f))
{
/* Remove all scroll bars because they have wrong colors. */
- if (condemn_scroll_bars_hook)
- (*condemn_scroll_bars_hook) (f);
- if (judge_scroll_bars_hook)
- (*judge_scroll_bars_hook) (f);
+ if (FRAME_DISPLAY (f)->condemn_scroll_bars_hook)
+ (*FRAME_DISPLAY (f)->condemn_scroll_bars_hook) (f);
+ if (FRAME_DISPLAY (f)->judge_scroll_bars_hook)
+ (*FRAME_DISPLAY (f)->judge_scroll_bars_hook) (f);
update_face_from_frame_parameter (f, Qscroll_bar_background, value);
redraw_frame (f);
@@ -3186,8 +3187,6 @@ This function is an internal primitive--use `make-frame' instead. */)
Lisp_Object parent;
struct kboard *kb;
- check_x ();
-
/* Use this general default value to start with
until we know if this frame has a specified name. */
Vx_resource_name = Vinvocation_name;
@@ -3242,6 +3241,9 @@ This function is an internal primitive--use `make-frame' instead. */)
/* Note that X Windows does support scroll bars. */
FRAME_CAN_HAVE_SCROLL_BARS (f) = 1;
+ f->display = dpyinfo->frame_display;
+ f->display->reference_count++;
+
f->output_method = output_x_window;
f->output_data.x = (struct x_output *) xmalloc (sizeof (struct x_output));
bzero (f->output_data.x, sizeof (struct x_output));
@@ -3331,6 +3333,8 @@ This function is an internal primitive--use `make-frame' instead. */)
specbind (Qx_resource_name, name);
}
+ Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qx), Qnil));
+
/* Extract the window parameters from the supplied values
that are needed to determine window geometry. */
{
@@ -4119,8 +4123,10 @@ x_display_info_for_name (name)
CHECK_STRING (name);
- if (! EQ (Vwindow_system, intern ("x")))
- error ("Not using X Windows");
+#if 0
+ if (! EQ (Vinitial_window_system, intern ("x")))
+ error ("Not using X Windows"); /* That doesn't stop us anymore. */
+#endif
for (dpyinfo = x_display_list, names = x_display_name_list;
dpyinfo;
@@ -4167,8 +4173,10 @@ terminate Emacs if we can't open the connection. */)
if (! NILP (xrm_string))
CHECK_STRING (xrm_string);
- if (! EQ (Vwindow_system, intern ("x")))
- error ("Not using X Windows");
+#if 0
+ if (! EQ (Vinitial_window_system, intern ("x")))
+ error ("Not using X Windows"); /* That doesn't stop us anymore. */
+#endif
if (! NILP (xrm_string))
xrm_option = (unsigned char *) SDATA (xrm_string);
@@ -9964,6 +9972,9 @@ x_create_tip_frame (dpyinfo, parms, text)
FRAME_CAN_HAVE_SCROLL_BARS (f) = 0;
record_unwind_protect (unwind_create_tip_frame, frame);
+ f->display = dpyinfo->frame_display;
+ f->display->reference_count++;
+
/* By setting the output method, we're essentially saying that
the frame is live, as per FRAME_LIVE_P. If we get a signal
from this point on, x_destroy_window might screw up reference
@@ -10187,6 +10198,8 @@ x_create_tip_frame (dpyinfo, parms, text)
Qnil));
}
+ Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qx), Qnil));
+
f->no_split = 1;
UNGCPRO;