bug#81580: 30.2; frame resizing does not work under KDE Plasma / Wayland

Johan Myréen <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <CA+TD5hj9yik5K_CjS1GZm+UH-zs_9BEQ8h1m95EQoUJ7FWABPg@mail.gmail.com>
This problem was discussed on the Emacs-devel mailing list in December last
year. Jens Schmidt suggested adding a window rule in KDE Plasma's System
Settings, see
https://lists.gnu.org/archive/html/emacs-devel/2025-12/msg00611.html

This is of course not a satisfactory solution, but it works for me. I'm
running the PGTK build (master) on Wayland, and if I disable the KDE window
rule, I only run into the problem if I run with GDK_BACKEND=x11, which is
an unsupported combination.

I have enabled pixelwise resize in my init file, but that setting does not
seem to make a difference. If I start emacs with -Q, the default is to
resize by character and that works fine under Wayland, too.


On Sat, 8 Aug 2026 at 19:50, martin rudalics <[email protected]> wrote:

>  >> Under the KDE Plasma window manager, it is normal to be able to
>  >> resize a window by dragging one of its borders or one of its corners
>  >> with the mouse. This has worked for me, for Emacs and most other
>  >> programs, for the last 20 years, under X11. Under Wayland, however,
>  >> this does not work for Emacs (it still works for most other programs):
>  >> The first attempt to resize it changes the size only by a few pixels,
>  >> and further attempts don't change it at all any more — or by several
>  >> dozens of pixels, which feels like "random" behaviour.
>  >>
>  >> Find attached a video of the interaction, on an Emacs instance
>  >> opened through 'emacs -q'.
>  >>
>  >> Platform details:
>  >> Distro: Kubuntu 26.04
>  >> Windowing system: Wayland
>  >> KDE Plasma version: 6.6.5
>  >>
>  >> This workaround from
>  >>
> https://www.reddit.com/r/emacs/comments/1p0h08g/cant_resize_emacs_frame_by_dragging_frame_corners/
>  >> works: adding this line to $HOME/.emacs:
>  >> (setq frame-resize-pixelwise t)
>  >>
>  >> But I claim that as a user, I should not need to do this workaround. In
>  >> other words, Emacs should allow resizing its frame by default.
>  >> Why?
>  >> 1) Because that is what a normal user expects when most other programs
>  >> allow resizing their windows in this way.
>  >> 2) Because the documentation of this variable
>  >>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Frame-Size.html#index-frame_002dresize_002dpixelwise
>  >> suggests that it is only needed for making maximized/full-screen frames
>  >> work.
>
> The Elisp manual entry for 'frame-resize-pixelwise' says that
>
>       Dragging the external border with the mouse is
>       done character-wise provided the window manager is willing to
>       process the corresponding size hints.
>
> Apparently your KDE Plasma is no more willing to do that.
>
>  >> But here, the Maximize button works perfectly fine; it's the
>  >> resizing with a mouse that does not work.
>  >
>  > I think this is a known problem, caused by Wayland and GTK.  Our
>  > recommendation is to use the PGTK build on Wayland.
>  >
>  > Martin, any comments or suggestions?
>
> It's apparently a new problem.  Emacs by default prescribes to resize
> frames character-wise.  This has worked for decades on window managers
> under X11 while it never worked on Windows.  Latest versions of KDE and
> GNOME are exclusively based on Wayland and whether the X11 compatibility
> layer can handle character-wise resizing is beyond my knowledge.  Maybe
> Johan who is on KDE Plasma can say more.  Pure Wayland cannot resize
> character-wise and the PGTK build does not support it either.
>
> Ceterum censeo 'frame-resize-pixelwise' will have to default to t sooner
> or later anyway and will be usable only with older window managers and
> non-GTK X builds (maybe).
>
> martin
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.