Bug 99595 - The click on the title bar immediately following maximize window doesn't work
Summary: The click on the title bar immediately following maximize window doesn't work
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/twm (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-29 23:27 UTC by iii_iii
Modified: 2018-08-10 20:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iii_iii 2017-01-29 23:27:13 UTC
To recreate this you need to have a way to maximize (fullzoom) a window, for example in .twmrc put:

RightTitleButton "bitmapname" = f.fullzoom

Then, for example on an xterm window, click the button on the right of the title bar to maximize the window. Then click anywhere again on the title bar with the mouse.

Expected result would be the normal function when clicking on the title bar.

Actual result is that the click does nothing except display a symbol of the mouse buttons with one button highlighted.

The next click works as expected.
Comment 1 iii_iii 2017-01-29 23:29:43 UTC
I have put it as low importance but only because it has been there for decades possibly. It's quite annoying.
Comment 2 Rodrigo 2017-08-31 20:59:55 UTC
I use FreeBSD 11.1, and the version of twm should be twm-1.0.9. I know this problem since more than 10 years. 

Since twm is one of the few meager Windows Managers alive and very stable, since it is a standard, since its lack of virtual desktops and expectations of the time, I see the importance as high: it is very important to iconify or maximize a window with a simple mouse touch for making place in the desktop.

If you bind f.fullzoom with something like:

LeftTitleButton ":question" = f.fullzoom

or if you have it in a menu WinOP bound to root with

Button1 = : root : f.menu "WinOp"

Then, the next click with any mouse key after maximizing a window has no other effect than converting the cursor in a tiny mouse icon showing the pressed mouse key.

There is a situation where this does not happen: if f.fullzoom is in a menu and the menu is bound to the button or to a key press on the title.
Comment 3 Rodrigo 2017-08-31 21:19:33 UTC
And the same happens with the other zoom functions (f.fullzoom, f.topzoom, f.bottomzoom, f.leftzoom, f.rightzoom, f.zoom, f.horizoom).

As said, if a menu WinOp containing the zoom function is bound to a button or to a key press on title, there is no problem. 

If WinOp is bound to the root, it works like f.move (if it is in WinOp): one must first select the zoom function and later touch the window. But the problem is like described by the original poster.

I hope twm becomes free of bugs, but do not grow any more (and get bloated).
Comment 4 rufwoof 2017-12-03 01:25:56 UTC
Workaround that works for me ...

function fullscreen { f.fullzoom f.winrefresh }

and call that instead of just f.fullzoom alone i.e. perhaps something like

LeftTitleButton "maximize.xbm" = f.function "fullscreen"
Comment 5 iii_iii 2017-12-03 22:03:28 UTC
Yes that works! Brilliant.

(I changed the line a bit to:

Function "fullscreen" { f.fullzoom f.winrefresh }

)
Comment 6 rufwoof 2017-12-04 01:51:39 UTC
Sorry, my bad. I typed from memory rather than transposing and forgot the quotes around the function name. Thanks.
Comment 7 rufwoof 2017-12-04 09:58:08 UTC
Rather than marking this report as just resolved, or changing twm code to have maximise/restore (f.fullzoom) operate with single clicks to both maximise and restore (instead of showing the mouse cursor on the first click before a restore occurs), and in so doing potentially inducing other bugs/issues, if the man pages are changed to document the 'feature' then the issue would have been resolved with the least amount of risk. i.e. add to the current manual text to extend the f.fullzoom description from its current

f.fullzoom
               This function resizes the selected window to the full size of
               the display or else restores the original size if the window
               was already zoomed.

to perhaps something like

f.fullzoom
               This function resizes the selected window to the full size of
               the display or else restores the original size if the window
               was already zoomed. In some cases f.fullzoom may maximize to 
               full size of display after a single mouse click, but require
               two mouse clicks instead of a single mouse click to restore the
               original window size. When single mouse clicks are desired to
               both maximize and restore a alternative is to define a
               function Function "FullZoom" { f.fullzoom f.winrefresh }
               and invoke that by using f.function "FullZoom" instead of
               invoking f.fullzoom.
Comment 8 iii_iii 2017-12-05 08:55:26 UTC
I don't quite follow. It isn't just maximize and restore which are affected, it is any mouse click on the title bar, no matter what the function, fails after fullzoom. For example you cannot move the window, or minimize it. So I don't think the bug is resolved. This is just a work-around.
Comment 9 rufwoof 2017-12-06 00:09:16 UTC
It seems to be the f.fullzoom that causes the 'problem'. For instance after using that function method of maximising a window all operations work OK immediately afterwards as expected i.e. I can maximise a window and then immediately click/drag the title to move the window (don't have to click once to clear the f.fullzoom problem before the second mouse press moves the window ... or whatever).
Comment 10 GitLab Migration User 2018-08-10 20:26:31 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/twm/issues/5.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.