X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0808f2a1a331fbcb2e6ab57894502b0a34311869..0a2aedfe6d650e825a50f25f972bac20d669f5cb:/src/xfns.c diff --git a/src/xfns.c b/src/xfns.c index 9ff77738c1..798dc49bef 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -91,11 +91,6 @@ along with GNU Emacs. If not, see . */ #include "../lwlib/xlwmenu.h" #endif -#if !defined (NO_EDITRES) -#define HACK_EDITRES -extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); -#endif /* not defined NO_EDITRES */ - /* Unique id counter for widgets created by the Lucid Widget Library. */ extern LWLIB_ID widget_id_tick; @@ -1434,7 +1429,7 @@ x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldva if (border != FRAME_INTERNAL_BORDER_WIDTH (f)) { - FRAME_INTERNAL_BORDER_WIDTH (f) = border; + f->internal_border_width = border; #ifdef USE_X_TOOLKIT if (FRAME_X_OUTPUT (f)->edit_widget) @@ -2662,7 +2657,7 @@ x_window (struct frame *f, long window_prompting) hack_wm_protocols (f, shell_widget); -#ifdef HACK_EDITRES +#ifdef X_TOOLKIT_EDITRES XtAddEventHandler (shell_widget, 0, True, _XEditResCheckMessages, 0); #endif @@ -4286,7 +4281,7 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo) n_monitors = resources->noutput; monitors = xzalloc (n_monitors * sizeof *monitors); -#ifdef RANDR13_LIBRARY +#if RANDR13_LIBRARY if (randr13_avail) pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window); #endif @@ -4295,8 +4290,8 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo) { XRROutputInfo *info = XRRGetOutputInfo (dpy, resources, resources->outputs[i]); - Connection conn = info ? info->connection : RR_Disconnected; - RRCrtc id = info ? info->crtc : None; + if (!info) + continue; if (strcmp (info->name, "default") == 0) { @@ -4307,9 +4302,9 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo) return Qnil; } - if (conn != RR_Disconnected && id != None) + if (info->connection != RR_Disconnected && info->crtc != None) { - XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, id); + XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, info->crtc); struct MonitorInfo *mi = &monitors[i]; XRectangle workarea_r;