• Jan D's avatar
    Updates for compiling with Gtk+ 3.0 (--with-x-toolkit=gtk3). · 0afb4571
    Jan D authored
    * configure.in: Require 3.0 for --with-gtk3.  Add HAVE_GTK3.
    * doc/emacs/xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work
    for Gtk+ 3.
    * src/gtkutil.c: Include gtkx.h if HAVE_GTK3.  If ! HAVE_GTK3, define
    gdk_window_get_screen, gdk_window_get_geometry,
    gdk_x11_window_lookup_for_display and GDK_KEY_g.
    (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
    (xg_get_pixbuf_from_pixmap): New function.
    (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
    to Pixmap, take frame as parameter, remove GdkColormap parameter.
    Call xg_get_pixbuf_from_pixmap instead of
    (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
    xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
    (xg_check_special_colors): Use GtkStyleContext and its functions
    for HAVE_GTK3.
    (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
    (xg_prepare_tooltip, create_dialog, menubar_map_cb)
    (xg_update_frame_menubar, xg_tool_bar_detach_callback)
    (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call
    (xg_frame_resized): gdk_window_get_geometry only takes 5
    (xg_win_to_widget, xg_event_is_for_menubar): Call
    (xg_set_widget_bg): New function.
    (delete_cb): New function.
    (xg_create_frame_widgets): connect delete-event to delete_cb.
    Call xg_set_widget_bg.  Only set backgrund pixmap for ! HAVE_GTK3
    (xg_set_background_color): Call xg_set_widget_bg.
    (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
    (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
    Only call gtk_range_set_update_policy if ! HAVE_GTK3.
    (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
    if ! HAVE_GTK3.
    (update_frame_tool_bar): Call gtk_widget_hide.
    (xg_initialize): Use GDK_KEY_g.
    * src/xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
    * src/xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
    if ! HAVE_GTK3
    (x_session_initialize): Call gdk_x11_set_sm_client_id.
    * src/xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
    (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
    Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
    * src/xterm.h (DEFAULT_GDK_DISPLAY): New define.
    (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
    for ! HAVE_GTK3.
ChangeLog 1.07 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.