{
}
-
-static void
-x_icon (struct frame *f, Lisp_Object parms)
-/* --------------------------------------------------------------------------
- Strangely-named function to set icon position parameters in frame.
- This is irrelevant under macOS, but might be needed under GNUstep,
- depending on the window manager used. Note, this is not a standard
- frame parameter-setter; it is called directly from x-create-frame.
- -------------------------------------------------------------------------- */
-{
-#if 0
- Lisp_Object icon_x, icon_y;
- struct pgtk_display_info *dpyinfo = check_pgtk_display_info (Qnil);
-
- FRAME_X_OUTPUT (f)->icon_top = -1;
- FRAME_X_OUTPUT (f)->icon_left = -1;
-
- /* Set the position of the icon. */
- icon_x =
- gui_display_get_arg (dpyinfo, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER);
- icon_y =
- gui_display_get_arg (dpyinfo, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
- if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
- {
- CHECK_NUMBER (icon_x);
- CHECK_NUMBER (icon_y);
- FRAME_X_OUTPUT (f)->icon_top = XFIXNUM (icon_y);
- FRAME_X_OUTPUT (f)->icon_left = XFIXNUM (icon_x);
- }
- else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
- error ("Both left and top icon corners of icon must be specified");
-#endif
-}
-
/**
* x_set_undecorated:
*
if (!pgtk_parse_color (f, SSDATA (new_value), &rgb))
error ("Unknown color.");
- /* On pgtk, this frame parameter should be ignored, and honor gtk theme. */
-#if 0
char css[64];
sprintf (css, "scrollbar slider { background-color: #%06x; }",
(unsigned int) rgb.pixel & 0xffffff);
gtk_css_provider_load_from_data (css_provider, css, -1, NULL);
-#endif
update_face_from_frame_parameter (f, Qscroll_bar_foreground, new_value);
}
if (!pgtk_parse_color (f, SSDATA (new_value), &rgb))
error ("Unknown color.");
- /* On pgtk, this frame parameter should be ignored, and honor gtk theme. */
-#if 0
+ /* On pgtk, this frame parameter should be ignored, and honor
+ gtk theme. (It honors the GTK theme if not explictly set, so
+ I see no harm in letting users tinker a bit more.) */
char css[64];
sprintf (css, "scrollbar trough { background-color: #%06x; }",
(unsigned int) rgb.pixel & 0xffffff);
gtk_css_provider_load_from_data (css_provider, css, -1, NULL);
-#endif
update_face_from_frame_parameter (f, Qscroll_bar_background, new_value);
}
f->output_method = output_pgtk;
FRAME_X_OUTPUT (f) = xzalloc (sizeof *FRAME_X_OUTPUT (f));
-#if 0
- FRAME_X_OUTPUT (f)->icon_bitmap = -1;
-#endif
FRAME_FONTSET (f) = -1;
FRAME_X_OUTPUT (f)->white_relief.pixel = -1;
FRAME_X_OUTPUT (f)->black_relief.pixel = -1;
error ("Invalid frame font");
}
- /* Frame contents get displaced if an embedded X window has a border. */
-#if 0
- if (!FRAME_X_EMBEDDED_P (f))
-#endif
- gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
- "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
+ gui_default_parameter (f, parms, Qborder_width, make_fixnum (0),
+ "borderWidth", "BorderWidth", RES_TYPE_NUMBER);
if (NILP (Fassq (Qinternal_border_width, parms)))
{
RES_TYPE_BOOLEAN);
f->no_split = minibuffer_only || EQ (tem, Qt);
-#if 0
- x_icon_verify (f, parms);
-#endif
-
/* Create the X widget or window. */
/* x_window (f); */
xg_create_frame_widgets (f);
#undef INSTALL_CURSOR
- x_icon (f, parms);
-#if 0
- x_make_gc (f);
-#endif
-
/* Now consider the frame official. */
f->terminal->reference_count++;
FRAME_DISPLAY_INFO (f)->reference_count++;
return unbind_to (count, frame);
}
-
-#if 0
-static int
-pgtk_window_is_ancestor (PGTKWindow * win, PGTKWindow * candidate)
-/* Test whether CANDIDATE is an ancestor window of WIN. */
-{
- if (candidate == NULL)
- return 0;
- else if (win == candidate)
- return 1;
- else
- return pgtk_window_is_ancestor (win,[candidate parentWindow]);
-}
-#endif
-
/**
* x_frame_restack:
*
counts etc. */
f->output_method = output_pgtk;
f->output_data.pgtk = xzalloc (sizeof *f->output_data.pgtk);
-#if 0
- f->output_data.pgtk->icon_bitmap = -1;
-#endif
FRAME_FONTSET (f) = -1;
f->output_data.pgtk->white_relief.pixel = -1;
f->output_data.pgtk->black_relief.pixel = -1;
gtk_window_set_type_hint (GTK_WINDOW (tip_window), GDK_WINDOW_TYPE_HINT_TOOLTIP);
f->output_data.pgtk->current_cursor = f->output_data.pgtk->text_cursor;
-#if 0
- x_make_gc (f);
-#endif
-
gui_default_parameter (f, parms, Qauto_raise, Qnil,
"autoRaise", "AutoRaiseLower", RES_TYPE_BOOLEAN);
gui_default_parameter (f, parms, Qauto_lower, Qnil,
static void
show_help_event (struct frame *f, GtkWidget *widget, Lisp_Object help)
{
- /* Don't show this tooltip.
- * Tooltips are always tied to main widget, so stacking order
- * on Wayland is:
- * (above)
- * - menu
- * - tooltip
- * - main widget
- * (below)
- * This is applicable to tooltips for menu, and menu tooltips
- * are shown below menus.
- * As a workaround, I entrust Gtk with menu tooltips, and
- * let emacs not to show menu tooltips.
- */
-
-#if 0
- Lisp_Object frame;
-
- if (f)
- {
- XSETFRAME (frame, f);
- kbd_buffer_store_help_event (frame, help);
- }
- else
- show_help_echo (help, Qnil, Qnil, Qnil);
-#endif
+ /* Don't show help echo on PGTK, as tooltips are always transient
+ for the main widget, so on Wayland the menu will display above
+ and obscure the tooltip. FIXME: this is some low hanging fruit
+ for fixing. After you fix Fx_show_tip in pgtkterm.c so that it
+ can display tooltips above menus, copy the definition of this
+ function from xmenu.c.
+
+ As a workaround, GTK is used to display menu tooltips, outside
+ the Emacs help echo machinery. */
}
/* Callback called when menu items are highlighted/unhighlighted
block_input ();
-#if 0
- x_set_bitmap_icon (f);
-#endif
-
if (FRAME_GTK_OUTER_WIDGET (f))
{
if (!FRAME_VISIBLE_P (f))
/* Make sure the X server knows where the window should be positioned,
in case the user deiconifies with the window manager. */
- if (!FRAME_VISIBLE_P (f) && !FRAME_ICONIFIED_P (f)
-#if 0
- && !FRAME_X_EMBEDDED_P (f)
-#endif
- )
+ if (!FRAME_VISIBLE_P (f) && !FRAME_ICONIFIED_P (f))
x_set_offset (f, f->left_pos, f->top_pos, 0);
-#if 0
- if (!FRAME_VISIBLE_P (f))
- {
- /* If the frame was withdrawn, before, we must map it. */
- XMapRaised (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f));
- }
-#endif
-
SET_FRAME_ICONIFIED (f, true);
SET_FRAME_VISIBLE (f, 0);
else if (alpha < alpha_min && alpha_min <= 1.0)
alpha = alpha_min;
-#if 0
- /* If there is a parent from the window manager, put the property there
- also, to work around broken window managers that fail to do that.
- Do this unconditionally as this function is called on reparent when
- alpha has not changed on the frame. */
-
- if (!FRAME_PARENT_FRAME (f))
- {
- Window parent = x_find_topmost_parent (f);
- if (parent != None)
- XChangeProperty (dpy, parent, dpyinfo->Xatom_net_wm_window_opacity,
- XA_CARDINAL, 32, PropModeReplace,
- (unsigned char *) &opac, 1);
- }
-#endif
-
set_opacity_recursively (FRAME_WIDGET (f), &alpha);
/* without this, blending mode is strange on wayland. */
gtk_widget_queue_resize_no_redraw (FRAME_WIDGET (f));
dpyinfo = FRAME_DISPLAY_INFO (frame);
dpyinfo->last_mouse_glyph_frame = NULL;
-#if 0
- x_display_set_last_user_time (dpyinfo, event->button.time);
-#endif
if (gui_mouse_grabbed (dpyinfo))
f = dpyinfo->last_mouse_frame;
}
}
- /* xg_event_is_for_scrollbar() doesn't work correctly on sway, and
- * we shouldn't need it.
- */
-#if 0
- if (f && xg_event_is_for_scrollbar (f, event))
- f = 0;
-#endif
-
if (f)
{
/* Is this in the tab-bar? */
if (!NILP (tab_bar_arg))
inev.ie.arg = tab_bar_arg;
}
-#if 0
- if (FRAME_X_EMBEDDED_P (f))
- xembed_send_message (f, event->button.time,
- XEMBED_REQUEST_FOCUS, 0, 0, 0);
-#endif
}
if (event->type == GDK_BUTTON_PRESS)