1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-27 16:51:06 -07:00

Clean up lots of #ifdef'd out code in PGTK files

Most of them are either relics from X or from the NS code
pgtkfns.c was copied from whole.

* src/pgtkfns.c (x_icon):
(pgtk_set_scroll_bar_foreground):
(pgtk_set_scroll_bar_background):
(Fx_create_frame):
(pgtk_window_is_ancestor):
(x_create_tip_frame):
* src/pgtkselect.c (syms_of_pgtkselect):
* src/pgtkterm.c (pgtk_iconify_frame):
(x_set_frame_alpha):
(button_event): Remove defined out code that cannot make sense.

* src/pgtkmenu.c (show_help_event): Remove ifdef'd out code and
reword comment.
This commit is contained in:
Po Lu 2022-02-06 09:18:59 +08:00
parent 9c1d6b1d6a
commit b38c0d6a2f
4 changed files with 14 additions and 162 deletions

View file

@ -582,10 +582,6 @@ pgtk_iconify_frame (struct frame *f)
block_input ();
#if 0
x_set_bitmap_icon (f);
#endif
if (FRAME_GTK_OUTER_WIDGET (f))
{
if (!FRAME_VISIBLE_P (f))
@ -600,21 +596,9 @@ pgtk_iconify_frame (struct frame *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);
@ -4600,22 +4584,6 @@ x_set_frame_alpha (struct frame *f)
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));
@ -6152,9 +6120,6 @@ button_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
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;
@ -6183,14 +6148,6 @@ button_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
}
}
/* 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? */
@ -6232,11 +6189,6 @@ button_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data)
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)