#include "bitmaps/gray.xbm"
+#ifdef HAVE_XKB
+#include <X11/XKBlib.h>
+#endif
+
/* Default to using XIM if available. */
#ifdef USE_XIM
int use_xim = 1;
else
{
block_input ();
+#ifdef HAVE_XKB
+ XkbBell (FRAME_X_DISPLAY (f), None, 0, None);
+#else
XBell (FRAME_X_DISPLAY (f), 0);
+#endif
XFlush (FRAME_X_DISPLAY (f));
unblock_input ();
}
/* Draw the empty space above the handle. Note that we can't clear
zero-height areas; that means "clear to end of window." */
- if (0 < start)
+ if (start > 0)
x_clear_area (FRAME_X_DISPLAY (f), w,
/* x, y, width, height, and exposures. */
VERTICAL_SCROLL_BAR_LEFT_BORDER,
static int
x_error_handler (Display *display, XErrorEvent *event)
{
-#ifdef HAVE_GTK3
+#if defined USE_GTK && defined HAVE_GTK3
if (event->error_code == BadMatch
&& event->request_code == X_SetInputFocus
&& event->minor_code == 0)
XSETFRAME (frame, f);
x_send_client_event (frame, make_number (0), frame,
dpyinfo->Xatom_net_active_window,
- make_number (32),
- Fcons (make_number (1),
- Fcons (make_number (last_user_time),
- Qnil)));
+ make_number (32), list2i (1, last_user_time));
}
}
dpy = DEFAULT_GDK_DISPLAY ();
-#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90
+#if ! GTK_CHECK_VERSION (2, 90, 0)
/* Load our own gtkrc if it exists. */
{
const char *file = "~/.emacs.d/gtkrc";
{ "_NET_WM_WINDOW_OPACITY", &dpyinfo->Xatom_net_wm_window_opacity },
{ "_NET_ACTIVE_WINDOW", &dpyinfo->Xatom_net_active_window },
{ "_NET_FRAME_EXTENTS", &dpyinfo->Xatom_net_frame_extents },
+ { "_NET_CURRENT_DESKTOP", &dpyinfo->Xatom_net_current_desktop },
+ { "_NET_WORKAREA", &dpyinfo->Xatom_net_workarea },
/* Session management */
{ "SM_CLIENT_ID", &dpyinfo->Xatom_SM_CLIENT_ID },
{ "_XSETTINGS_SETTINGS", &dpyinfo->Xatom_xsettings_prop },
Vx_toolkit_scroll_bars = Qnil;
#endif
- DEFVAR_BOOL ("scroll-bar-adjust-thumb-portion",
- scroll_bar_adjust_thumb_portion_p,
- doc: /* Adjust thumb for overscrolling for Gtk+ and MOTIF.
-Non-nil means adjust the thumb in the scroll bar so it can be dragged downwards
-even if the end of the buffer is shown (i.e. overscrolling).
-Set to nil if you want the thumb to be at the bottom when the end of the buffer
-is shown. Also, the thumb fills the whole scroll bar when the entire buffer
-is visible. In this case you can not overscroll. */);
- scroll_bar_adjust_thumb_portion_p = 1;
-
staticpro (&last_mouse_motion_frame);
last_mouse_motion_frame = Qnil;