Window resizing help
Posted
#1
(In Topic #961)
Guru

I wrote a routine to resize a window without a titlebar/border
it tracks the mouse and makes the mouse image change okay (needs a better way to set it back to normal though)
Something is not correct though with moving the Left/Top edge and I can't get my head around it.
it seems the (Mouse.X - Mouse.StartX) is jumpy. when moving the left edge the right edge moves a bit and it shouldn't
same with the top edge moving the bottom edge.
has anyone made a cleaner window resizer method?
TIA
Posted
Guru

I could not get over the glitch so i worked around it.
Now the window position is noted on a MouseDown event.
then after any Top or Left resize operation the windows Right and Bottom edge are set to the initial noted value in case they have moved.
Seems to work a treat now
PS.
the attached program has a Form.class that if you drop into your application .src folder you will be able to enable the resizing on any Form by setting it's
Form.Borderless property.
handle size can be set with Form.HandleSize property
Happy Christmas
Posted
Guru

Posted
Guru

cogier said
I am glad you got it working. Are you using Wayland? I noticed this on the Mailing List.
No i hate wayland it sucks. i think it needs boycotting for being so rubbish.
Wayland is glitchy, Ben seems to think top level windows are not movable but they are (maybe the desktop top level window cannot be moved but every application i tried works okay if you do not use gb.gtk3.wayland), or maybe "top-level" refers to "on-top" windows like modals? i dunno
There is just a glitch in gtk3 on wayland but qt and gtk2 work okay with moving windows.
I reported a bug..
Connexion
Bruce on BugTracker said
wayland gtk Form position error
With Gtk3 on wayland there are 2 things are quite prevalent.
Form_Move() event does not trigger
My Window position is always X=45, Y=45 even after moving the window.
With QT and gtk2 it works as expected.
it's not been fixed yet. (maybe Ben cannot fix it?)
Posted
Guru

BruceSteers said
cogier said
I am glad you got it working. Are you using Wayland? I noticed this on the Mailing List.
No i hate wayland it sucks. i think it needs boycotting for being so rubbish.
Give me MATE any day
When ubuntu first started the crappy Unity desktop i soon found the old gnome-falback for that old gnome2 traditional desktop environment feel. then MATE got it right
That and Compiz Wobbly windows. if my linux does not have wobbly windows i don't want it
Posted
Regular

No i hate wayland it sucks. i think it needs boycotting for being so rubbish.BruceSteers said
Oh that is sooo judgemental! I mean for a rendering protocol mooted in 2008 and started in 2010 because X was "too old" it has certainly come a little way to creating a window manager that these days has almost, but not quite, replaced window rendering with … well … nothing.
ymmv
b
Posted
Guru

thatbruce said
BruceSteers said
No i hate wayland it sucks. i think it needs boycotting for being so rubbish.
Oh that is sooo judgemental! I mean for a rendering protocol mooted in 2008 and started in 2010 because X was "too old" it has certainly come a little way to creating a window manager that these days has almost, but not quite, replaced window rendering with … well … nothing.
ymmv
b
Haha. "come a little way" , yep that's true
What i hate most i think is the way it seems to be restricting gambas.
Certain features gambas has and we know and love are now being met with "but we cannot do that in wayland, meaning gambas can't/won't do it !
But like i've said, i think gambas works pretty much as normal on wayland with gb-qt-wayland and gb-gtk-wayland
I found it's just gb-gtk3-wayland that has window moving issues at present.
1 guest and 0 members have just viewed this.


