Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-18 Thread Matthew D. Fuller


On Thu, Oct 17, 2019 at 06:22:17PM +0200 I heard the voice of
Rhialto, and lo! it spake thus:
> 
> Maybe they mean that _NET_FRAME_EXTENTS is meant to be set only
> *after* a window is mapped, and _NET_REQUEST_FRAME_EXTENTS can
> request that it happens earlier.

My best reading is something like that.  Or, alternately, that we're
talking about 2 separate features (EWMH is nicely full of those); one
where the WM sets the property to pass along the information, and one
where the client sends the message to request a guess about the info
before the WM really knows it to set.

So, I think we can go ahead and implement the first feature, and
continue to ignore the heck out of the latter.  I think it's actually
in the category of things we'd have to advertise in _NET_SUPPORTED,
and the client shouldn't send it if we don't anyway.

In fact, trying to support that would be a pretty sizable change.  We
don't AddWindow() until a window _is_ mapped, so that would be
starting to listen to and interact with windows we currently
completely ignore the existence of.  Tweaked Max's code a little and
merged.


-- 
Matthew Fuller (MF4839)   |  fulle...@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-18 Thread Matthew D. Fuller


On Thu, Oct 17, 2019 at 11:23:58AM -0400 I heard the voice of
Stefan Monnier, and lo! it spake thus:
> 
> AFAICT, that doesn't explain why this is needed for Firefox's
> popups.

It's because the form autofill popups[0] are separate windows
positioned by FF on top of it.  That is, they're not _children_ of the
main FF window; they're separate root-level X windows.  That's
necessary in the context menu's case, because it may need (well, want)
to extend outside the main FF window, for instance.

Now, I think in the abstract, the toolkit could use
XTranslateCoordinates() to figure out where to position [absolutely]
the new window, so that it's in the proper place relative to the
action it's trying to perform inside the window.  So, in some strict
sense, maybe it's a FF (or probably GTK, maybe) laziness bug.  But,
whatever...



[0] Also visible in some other cases, like the right-click context
menu; it _should_ come up with the top-left corner at the pointed,
but winds up with the mouse a titlebar-height down into it.


-- 
Matthew Fuller (MF4839)   |  fulle...@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Stefan Monnier


> The "specification" isn't entirely explicit on this point. On the one
> hand, it says "The Window Manager MUST set _NET_FRAME_EXTENTS" (at
> https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472552416
> ) but then the _NET_REQUEST_FRAME_EXTENTS action "To retrieve such an
> estimate [about an unmapped window], the Client MUST send a
> _NET_REQUEST_FRAME_EXTENTS message to the root window. The Window
> Manager MUST respond by estimating the prospective frame extents and
> setting the window's _NET_FRAME_EXTENTS property accordingly. "
> (https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472648576)
> is rather superfluous...

I think setting it unconditionally is good enough here: we basically
"answer" regardless if the client asks the question, and we may even
answer before it asks the question.

But I'm not really familiar how this "setting values used as an indirect
way to send messages" is usually handled in the wm-spec, so maybe my
assumptions of what is "clear from context" are wrong.

> Maybe they mean that _NET_FRAME_EXTENTS is meant to be set only *after*
> a window is mapped,

No, I think it's clear that it needs to be set before the window is
mapped because it's for the case where the application wants to know
those things before the window is mapped.

> But then they might have mentioned that a bit more clearly.

Prose, you know...


Stefan



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Rhialto
On Thu 17 Oct 2019 at 11:23:58 -0400, Stefan Monnier wrote:
> In any case, I'm now running with the patch below (i.e. Maxime's but
> without the KDE part, with a few comments added, and using the {...}
> syntax to initialize the array) and it also fixes the problem for me.

Maybe we need some further change to support receiving
_NET_REQUEST_FRAME_EXTENTS ? On the other hand, what we're doing here
now seems to be much like what happens if _NET_REQUEST_FRAME_EXTENTS is
received for every window (we always add the property when a window gets
mapped).

The "specification" isn't entirely explicit on this point. On the one
hand, it says "The Window Manager MUST set _NET_FRAME_EXTENTS" (at
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472552416
) but then the _NET_REQUEST_FRAME_EXTENTS action "To retrieve such an
estimate [about an unmapped window], the Client MUST send a
_NET_REQUEST_FRAME_EXTENTS message to the root window. The Window
Manager MUST respond by estimating the prospective frame extents and
setting the window's _NET_FRAME_EXTENTS property accordingly. "
(https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472648576)
is rather superfluous...

Maybe they mean that _NET_FRAME_EXTENTS is meant to be set only *after*
a window is mapped, and _NET_REQUEST_FRAME_EXTENTS can request that it
happens earlier. But then they might have mentioned that a bit more
clearly.

> Stefan
-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.   --Douglas Adams, "THGTTG"


signature.asc
Description: PGP signature


Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Bradan J. Wolbeck
Hi Olaf,

Oct 17, 2019, 10:06 by rhia...@falu.nl :

> ...do you use 3D borders (UseThreeDBorders, or UseThreeDTitles perhaps?)
>
It happens regardless of whether all of my UseThreeD* settings are enabled or 
commented out, unfortunately. 

Regards,
Bradan J. Wolbeck



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Rhialto
On Thu 17 Oct 2019 at 17:53:51 +0200, Bradan J. Wolbeck wrote:
> (I have a pair of attachments showing the difference for anyone who hasn't 
> encountered the issue for themselves.)

Thanks, that is illustrative. You can't see it on these pictures, but do
you use 3D borders (UseThreeDBorders, or UseThreeDTitles perhaps?) I was
thinking that I do not, and several places in the source of ctwm point
out that coordinates inside the window are differently organized between
3D and non-3D borders. Maybe this can explain why some people have the
problem, and some don't?

> Bradan J. Wolbeck
-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.   --Douglas Adams, "THGTTG"


signature.asc
Description: PGP signature


Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Bradan J. Wolbeck
Oct 15, 2019, 15:41 by btik-c...@scoubidou.com:

>
> I don't know whether you encounter this problem or not, but in my  case 
> (Linux or FreeBSD, with ctwm and without any session manager  nor 
> desktop), the field autocomplete feature of firefox is very  annoying as 
> the drop-down menu of possible completions appears  just over the field 
> itself.
>
>
This issue has pestered me quite a bit, as my new tab page has a search field 
that gets obstructed any time I would type in it.

> I made a patch to make it works with ctwm too and it fixes the  problem:
>
This did the trick for me! (Using the version with only the _NET_FRAME_EXTENTS 
in there.)
Thanks for the patch!

(I have a pair of attachments showing the difference for anyone who hasn't 
encountered the issue for themselves.)

Regards,
Bradan J. Wolbeck


Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Maxime Soulé



Hi Stefan,

On 17/10/2019 15:59, Stefan Monnier wrote:

The reason is the presence of at least one XProperty set only by fvwm,
either _NET_FRAME_EXTENTS or
_KDE_NET_WM_FRAME_STRUT:

Do I understand right that it's not necessary to set
_KDE_NET_WM_FRAME_STRUT if we set _NET_FRAME_EXTENTS?


You are right. I just modified my patch:

https://github.com/maxatome/ctwm-mirror/commit/5d09c4fa0175697fc594e8500e79b91e25dabd03

Regards,

Max.



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Rhialto
On Thu 17 Oct 2019 at 09:59:19 -0400, Stefan Monnier wrote:
> Does anyone know what _NET_FRAME_EXTENTS is supposed to mean?

Seems to be described here:
https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472552416

> 
> Stefan


signature.asc
Description: PGP signature


Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Tadziu Hoffmann



> Does anyone know what _NET_FRAME_EXTENTS is supposed to mean?

It is used to notify the client about the width(s) of the
window decoration added by the window manager.

https://standards.freedesktop.org/wm-spec/wm-spec-latest.html

  A Client whose window has not yet been mapped can request
  of the Window Manager an estimate of the frame extents it
  will be given upon mapping. To retrieve such an estimate,
  the Client MUST send a _NET_REQUEST_FRAME_EXTENTS message
  to the root window. The Window Manager MUST respond by
  estimating the prospective frame extents and setting the
  window's _NET_FRAME_EXTENTS property accordingly. The Client
  MUST handle the resulting _NET_FRAME_EXTENTS PropertyNotify
  event. So that the Window Manager has a good basis for
  estimation, the Client MUST set any window properties it
  intends to set before sending this message. The Client MUST
  be able to cope with imperfect estimates.

  Rationale: A client cannot calculate the dimensions of
  its window's frame before the window is mapped, but some
  toolkits need this information. Asking the window manager
  for an estimate of the extents is a workable solution. The
  estimate may depend on the current theme, font sizes or
  other window properties. The client can track changes to
  the frame's dimensions by listening for _NET_FRAME_EXTENTS
  PropertyNotify events.



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Stefan Monnier


> The reason is the presence of at least one XProperty set only by fvwm,
> either _NET_FRAME_EXTENTS or
> _KDE_NET_WM_FRAME_STRUT:

Do I understand right that it's not necessary to set
_KDE_NET_WM_FRAME_STRUT if we set _NET_FRAME_EXTENTS?

That would be good, since having to use something with KDE in its name
to solve a problem in a system that doesn't even have any part of Qt
installed sounds like a hack.

Does anyone know what _NET_FRAME_EXTENTS is supposed to mean?


Stefan



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-17 Thread Rhialto
On Tue 15 Oct 2019 at 23:41:17 +0200, Maxime Soulé wrote:
> I don't know whether you encounter this problem or not, but in my case
> (Linux or FreeBSD, with ctwm and without any session manager nor desktop),
> the field autocomplete feature of firefox is very annoying as the drop-down
> menu of possible completions appears just over the field itself.

Interestingly, I don't seem to have that problem. I wonder if there is
some setting which makes the difference...

I tried your change and fortunately it doesn't suddenly break it for me
(I didn't see any change, really).

So the addition is fine with me.

-Olaf.
-- 
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___  Anyone who is capable of getting themselves made President should on
\X/  no account be allowed to do the job.   --Douglas Adams, "THGTTG"


signature.asc
Description: PGP signature


Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-16 Thread Aaron Sloman


Max,
Many thanks for your rapid and helpful response!

I followed your instructions:

> git clone https://github.com/maxatome/ctwm-mirror.git
> cd ctwm-mirror
> make
> ls -la build/ctwm

then copied the new ctwm to replace the old one and did

ctwm --replace &

And it seems to have fixed the problem.

I suspect this has also fixed a related Firefox problem. If I selected a
url from a text file (e.g. email message) then paste it into the firefox
address bar in a newly created tab, Firefox would often insert a
previously used url instead of the one I was trying to paste in. I would
then have to delete the old url and copy in the desired one again.

Could that have been caused by the same flaw in ctwm?

Anyhow, I am very grateful for the fix!

Aaron
http://www.cs.bham.ac.uk/~axs



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-16 Thread Max


Hi Aaron,

Le 16/10/2019 à 01:10, Aaron Sloman a écrit :
> [snip]
> 
> I am not a regular user of github or patches, but would be willing to test
> this if given exact instructions, i.e. what to do after downloading the
> four changed files.

git clone https://github.com/maxatome/ctwm-mirror.git
cd ctwm-mirror
make
ls -la build/ctwm

> [snip]

Regards,

Max.



Re: Firefox field autocomplete drop-down menu annoying problem

2019-10-15 Thread Aaron Sloman


Max wrote:

> I don't know whether you encounter this problem or not, but in my case
> (Linux or FreeBSD, with ctwm and without any session manager nor
> desktop), the field autocomplete feature of firefox is very annoying as
> the drop-down menu of possible completions appears just over the field
> itself.

I have been EXTREMELY annoyed by this for a long time!

I think I complained to firefox and got no response. Now I know why.

> I made a patch to make it works with ctwm too and it fixes the problem:
>
> https://github.com/maxatome/ctwm-mirror/commit/052f7493bfc72f5437dcd014dfead307028a0618

I am not a regular user of github or patches, but would be willing to test
this if given exact instructions, i.e. what to do after downloading the
four changed files.

I currently use ctwm on fedora29 (mainly) and also sometimes CentOS 7.7.1908
and Scientific Linux release 6.10.

Fedora runs on my desktop and laptop at home, the other two on departmental
machines, where I've installed ctwm.

Thanks.

Aaron
http://www.cs.bham.ac.uk/~axs



Firefox field autocomplete drop-down menu annoying problem

2019-10-15 Thread Maxime Soulé

Hi,

I don't know whether you encounter this problem or not, but in my case 
(Linux or FreeBSD, with ctwm and without any session manager nor 
desktop), the field autocomplete feature of firefox is very annoying as 
the drop-down menu of possible completions appears just over the field 
itself.


Digging a little, I discovered that the shift corresponds to the title 
height.


Digging a little more, and this bug appears with ctwm and sawfish but 
not fvwm...


The reason is the presence of at least one XProperty set only by fvwm, 
either _NET_FRAME_EXTENTS or

_KDE_NET_WM_FRAME_STRUT:

https://github.com/fvwmorg/fvwm/blob/master/fvwm/ewmh.c#L1213-L1218

I made a patch to make it works with ctwm too and it fixes the problem:

https://github.com/maxatome/ctwm-mirror/commit/052f7493bfc72f5437dcd014dfead307028a0618

Regards,

Max.

<>