Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-09-07 08:37:58

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

twm like resizing by dragging from the maximize button

I for one am always surprised how practical and easy the window resize is in (good old) twm, when I occasionaly use it, and miss it in XFCE (especially when resizing a terminal window).

Here's how it works: By left clicking on a button on the title bar, the resize is initiated. Outline is drawn. Then you drag the mouse. Whichever edge you cross, you "grab it" and can size it - the opposite one stays fixed. For example, you drag the mouse across the top = you grab the top edge, bottom side holds. You can enlarge as well as shrink the window, once you got the hold of the edge. You can also switch the side you resize by "switching grab" (..by dragging "top across the bottom", top becomes fixed, bottom can be sized). The resize is finished when you release the mouse button (can be also cancelled with 'esc').

Why is this "mechanic" better than "simply" dragging the corner/edges? Since (at least for me) the margin of error for hitting the border is really small, just a couple of pixels. It is really hard to resize e.g. terminal at the moment. Thunar, mousepad can be resized ok, since they actually have extra button/area (bottom right).

So, I would like to propose enhancing the maximize button. In addition to current behaviour, (left) clicking on it _and dragging away from it_ would initiate the above described mechanic as in twm.

Btw, after searching the forums, I found Alt+right mouse button also causes resize. I may be doing something wrong, but the only resize I am able to do is vertical. Also, there is right click->Resize option. It always thinks you want to resize the bottom right corner of the window, while "twm-way" gives you the freedom to resize any side.


PS: If you want to try twm, I suggest putting xfce4-terminal into .xinitrc, startx, and in X start twm with "LC_ALL=C twm", otherwise for some reason the titlebar is far too big and that's not what I like..
PPS: Unfortunatelly, I failed to make a video of resize - recordmydesktop does not capture the whole process well, vlc too. twm grabs the X server for a while, that's why.

Last edited by apurkrt (2014-09-07 11:03:06)

Offline

#2 2014-09-07 08:50:46

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

Re: twm like resizing by dragging from the maximize button

Actually, right-dragging from the whole titlebar could initiate a resize in twm-style. Currently, both left and right mouse dragging the titlebar moves the window, which is imho redundant. Left drag = move, right drag = twm-style-resize would be better.

Last edited by apurkrt (2014-09-07 09:16:36)

Offline

#3 2014-09-07 10:31:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: twm like resizing by dragging from the maximize button

renergy wrote:

Btw, after searching the forums, I found Alt+right mouse button also causes resize. I may be doing something wrong, but the only resize I am able to do is vertical.

If you Alt+Right click in the bottom right corner of the window, then you can resize the whole window. If you Alt+Right click towards one of the edges, you'll only get one side resize.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2014-09-07 10:39:48

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

Re: twm like resizing by dragging from the maximize button

ToZ wrote:

If you Alt+Right click in the bottom right corner of the window, then you can resize the whole window. If you Alt+Right click towards one of the edges, you'll only get one side resize.

Thanks! That's really good.

Still would like to have the twm-like behaviour too, though, since it requires just mouse (just one hand)..

Last edited by apurkrt (2014-09-07 10:42:10)

Offline

#5 2014-09-07 18:37:04

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: twm like resizing by dragging from the maximize button

You might try a theme that has thicker window borders.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#6 2014-09-07 19:22:12

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

Re: twm like resizing by dragging from the maximize button

MountainDewManiac wrote:

You might try a theme that has thicker window borders.

Regards,
MDM

I'm using Daloa, which is in fact improvement over Default (5 or so pixels compared to 1). Actually with Default theme, resizing by dragging window edges is almost unusable, due to the 1px border. But I do not propose nor like overly thick borders; the twm-way does not require them.

My feeling is, the resizing by mouse in xfwm4 needs revamping.

Last edited by apurkrt (2014-09-07 19:23:21)

Offline

#7 2014-09-07 22:57:32

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,000

Re: twm like resizing by dragging from the maximize button

renergy wrote:

Still would like to have the twm-like behaviour too, though, since it requires just mouse (just one hand)..

Forgot to mention that you can also right-click the title bar and choose the "resize" option. In fact, you could remap Alt+Right mouse to initiate Alt+F8 which will initiate the resize event.

To do so, first install xdotool and xbindkeys, then run:

xbindkeys --defaults > $HOME/.xbindkeysrc

...to create the default config file, then add to the end of that file:

"xdotool key Alt+F8 "
	release+Alt+Mod2 + Alt_L + b:3

...and start xbindkeys:

xbindkeys

Now Alt+Right_mouse_button (anywhere in the focused window) will start the resize event for that window.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#8 2014-09-08 22:17:45

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

Re: twm like resizing by dragging from the maximize button

Alt+right mouse button resizing (in itself) seems perfectly fine to me, now that I know how to use it. Don't want to restrict it to resizing just bottom right corner. It's currently the best way of resizing windows in XFCE I know of. I knew already about the rightclick on titlebar->resize option.

Anyway, all this is miles away from the ease of twm, where you just swing the mouse from adequately sized button. Just one press, drag, release. Done. The drag is in one direction if you enlarge, two directions if you shrink the window (you need to grab the edge first). No "pixel hunting" the borders needed. No extra hand needed to press alt. No rightclick->navigate through the menu->click#2->resize(bottom right only..)->click#3.

I've recently reinstalled gentoo; twm+xterms is my intermediate phase before emerging XFCE. Not for the first time I thought - "hey, twm's way of resizing windows is just sooo cool and practical". So I wanted to share it.

I do recommend anybody to go and try window resizing in twm.

Alright, I know all this whining is no substitute for a patch suggestion smile

But seriously - resizing a window is an elementary operation of a window manager, it should be as easy as possible, and nothing's wrong if it is attainable in many ways.

Just my $0.02. Cheers.

Last edited by apurkrt (2014-09-08 22:21:58)

Offline

#9 2014-09-09 19:20:05

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: twm like resizing by dragging from the maximize button

I guess it comes down to personal taste. I, for one, feel that an action which requires a mouse "is miles away from the ease of use of" one that does not. Therefore, I use Alt-{spacebar} r so that I can resize the window without having to grab the mouse.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#10 2014-09-09 20:05:28

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

Re: twm like resizing by dragging from the maximize button

I have nothing against keyboard shortcuts. And I do realize that adding the new functionality to max button would require quite a bit of work.

After all, twm's mechanic was not followed by many other wm's. Which, for me, is a mystery. (fvwm works similarly, but does not have dedicated button, in default config).

All the best.

Last edited by apurkrt (2014-09-09 20:15:05)

Offline

#11 2014-10-06 02:04:43

colinkeenan
Member
Registered: 2014-09-17
Posts: 11

Re: twm like resizing by dragging from the maximize button

Anything that requires a special motion or key-press is not likely to be discovered by the majority of users so that they'll end up struggling with the 1px borders if they want a modern theme. I filed a bug: https://bugzilla.xfce.org/show_bug.cgi?id=11170, asking to simply add another button to the title bar that acts the same as alt-f8 or whatever hot-key is assigned for that.

Even that though is not as good as what I later discovered Unity does. Unity, after all, defaults to 0px borders! And yet, it's very easy to resize the intuitive way by left-clicking close to the edge of the window and dragging it. Why is that? It's because in each of their themes, they define an "additional input area" around the window. It defaults to 10px wide. So, you get the benefit of a 10px border without actually having any border at all. This is an excellent solution and one that Xfce should adopt.

But, the button would be easier. Anything that lets users know how they can more easily resize with just the mouse that they can discover on their own is very much needed.

I didn't even know about the various mouse methods mentioned on this forum. Now that I know - well great - but I've been using Xfce for over a year without discovering any of these methods, and although I knew there was a hotkey, it was too much trouble to figure out what it was.

Offline

#12 2014-10-28 08:47:57

apurkrt
Member
From: Czechia, Europe
Registered: 2014-08-31
Posts: 48

Re: twm like resizing by dragging from the maximize button

I don't think an extra button for resizing is a good idea; there is enough buttons already on the titlebar. As a matter of fact, I removed the shade/unshade button in Settings/Window Manager.

Anyhow, I would be all for the "additional input area" around (outside of) the window. This is a very good idea. Borders would be thin visually, but thick "functionally". +1 to that!

Offline

#13 2014-10-28 11:42:59

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: twm like resizing by dragging from the maximize button

Well, that's the thing. The way windows and window management are set up, there can be an "extra" button for some, but for those who have no use for it, it need never appear... The beauty of a customizable OS. I've got no use for such a button - but I'd not be opposed to it being implemented.

It beats allowing window operations to take place outside the actual windows, IMHO. (But, again, I'd not oppose that, if it did not compromise any current behaviors/functions, and if it were a configurable "opt-in" feature instead of being default.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

Board footer

Powered by FluxBB