GNU bug report logs -
#36250
Allow Emacs to be resized arbitrarily
Previous Next
Full log
View this message in rfc822 format
This constraint disallows standard compliant window managers to make
Emacs fullscreen on certain screen resolutions (ones that are not
multiple of width_inc and height_inc), or to expand Emacs to fill free
space on the screen (on certain sizes too).
It doesn't seem to do anything useful otherwise; besides some WMs
(like i3wm) just ignore this property anyway.
* src/xterm.c (x_wm_set_size_hint): don't set width_inc, height_inc, and
GDK_HINT_RESIZE_INC.
* src/gtkutil.c (x_wm_set_size_hint): don't set width_inc, height_inc, and
PResizeInc.
* src/emacsgtkfixed.c (XSetWMSizeHints): don't set width_inc and height_inc.
---
src/emacsgtkfixed.c | 2 --
src/gtkutil.c | 9 +--------
src/xterm.c | 5 +----
3 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 6b2b4f7018..352883a12f 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -222,8 +222,6 @@ XSetWMSizeHints (Display *d,
data[6] = hints->min_height;
data[7] = hints->max_width;
data[8] = hints->max_height;
- data[9] = hints->width_inc;
- data[10] = hints->height_inc;
data[11] = hints->min_aspect.x;
data[12] = hints->min_aspect.y;
data[13] = hints->max_aspect.x;
diff --git a/src/gtkutil.c b/src/gtkutil.c
index dccee15925..88ea38b557 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1428,12 +1428,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
size_hints = f->output_data.x->size_hints;
hint_flags = f->output_data.x->hint_flags;
-
- hint_flags |= GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE;
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
-
- hint_flags |= GDK_HINT_BASE_SIZE;
+ hint_flags |= GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE;
/* Use one row/col here so base_height/width does not become zero.
Gtk+ and/or Unity on Ubuntu 12.04 can't handle it.
Obviously this makes the row/col value displayed off by 1. */
@@ -1486,8 +1481,6 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position)
size_hints.base_width /= scale;
size_hints.base_height /= scale;
- size_hints.width_inc /= scale;
- size_hints.height_inc /= scale;
if (hint_flags != f->output_data.x->hint_flags
|| memcmp (&size_hints,
diff --git a/src/xterm.c b/src/xterm.c
index bc56e99513..cff74e4f22 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12124,7 +12124,7 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
#endif
/* Setting PMaxSize caused various problems. */
- size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */;
+ size_hints.flags = PMinSize /* | PMaxSize */;
size_hints.x = f->left_pos;
size_hints.y = f->top_pos;
@@ -12132,9 +12132,6 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position)
size_hints.width = FRAME_PIXEL_WIDTH (f);
size_hints.height = FRAME_PIXEL_HEIGHT (f);
- size_hints.width_inc = frame_resize_pixelwise ? 1 : FRAME_COLUMN_WIDTH (f);
- size_hints.height_inc = frame_resize_pixelwise ? 1 : FRAME_LINE_HEIGHT (f);
-
size_hints.max_width = x_display_pixel_width (FRAME_DISPLAY_INFO (f))
- FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0);
size_hints.max_height = x_display_pixel_height (FRAME_DISPLAY_INFO (f))
--
2.22.0
This bug report was last modified 4 years and 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.