emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs's set-frame-size can not work well with gnome-shell?


From: Dmitry Gutov
Subject: Re: Emacs's set-frame-size can not work well with gnome-shell?
Date: Mon, 20 Jan 2020 17:14:23 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 19.01.2020 11:52, martin rudalics wrote:
 > Maybe. But it might also mean that it's possible to provide some hint
 > to the window manager that resizing is indeed allowed.

Maybe.  But how would we find out?

By asking Mutter developers, maybe. Or reading Mutter code. Sorry, I'm not really qualified to do either.

Did others try your "fix" already?

I've posted the patch to posframe, let's see what others say. But I'm seeing a reliable improvement.

 > Do you have a compositing window manager (on your GNU/Linux system)?

Xfce comes with compositing capabilities but my graphic card might not
comply.  Setting an 'alpha' parameter for a child frame effectively does
not work (it seemed to work on my Windows machine but that is broken now
so I can't check).

If sending you a newer graphics card would help the situation, I'm game. :-)

Linux graphics drivers situation has been rather poor historically, so I'm not sure which one to choose.

> Mostly I don't care because normal Emacs frames
> always flicker during resizing anyway.

Even when resizing doesn't actually change the size?

> It doesn't flicker always, but like 3 out of 4 times is does. And running resize-test in a loop always shows 1-2 flickers, at least.

So when you now resize a child frame by dragging its corners, it usually
flickers.

I still can't resize it by dragging its corners. The "dragging" code doesn't know to make the frame invisible/visible, and I don't know where to change that.

It does not flicker at all here.  Probably because its buffer
is empty, possibly because certain compositing effects are ignored or
not implemented.

The buffer contents are the same for me.

 >> You could try to play around with 'x-wait-for-event-timeout'.
 >
 > You mean to bind it to a larger value around the body of resize-test?
 >
 > I tried 1, as well as 10. No change.

A floating point value less than 0.1.  Non-floating point values stand
for 0 ("no wait").  It stands for waiting that many seconds for a
configure notify event that would confirm that your frame has really
become visible or invisible.  So IIUC (Noam might correct me) you may
have to wait twice that time with WMs that don't send such events.

This is the usage you meant, right?

(defun resize-test (frame height)
  (let ((x-wait-for-event-timeout 0.05))
    (make-frame-invisible frame)
    (set-frame-height frame height)
    (make-frame-visible frame)))

I tried different values: 0.05, 0.001, 0.2, 0.5. The upshot, in this round of testing, is that it always flickers at least once. It might only flicker the mode-line and the scrollbar. Or it might flicker to show the contents of the underlying window. But that seems to happen regardless of the value above.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]