Resizing event

Hi to all,
During a test in Linux of a program that I’m writing for Windows, I noticed that the Resizing event of the main window does not seem to be detected. If possible I would like to know if this is connected to a my programming error or if it is a known issue for the version of Xojo for Linux (I’m using Xubuntu 12.04 with VirtualBox). In the link attached there is a small example program that reproduces my problem.

Thanks in advance


Same problem on Debian 7.5.
It seems that the “resizing” event is not fired at all on Linux.
Also, during window resize the “resized” event is called every time you stop dragging the mouse even if you not release the mouse button.
It’s a bug?

I just verified under Linux Mint, indeed Resizing does not fire.

Since you develop for Windows, you do need a workaround.

I just added a method to the window :

Sub Resizing System.Debuglog "Resizing "+str(Ticks) end sub

Add a 5 ms multiple timer with in the Action event :

[code]Sub Action
static previousWidth as Integer = self.width
static previousHeight as Integer = self.Height

If Self.Width <> previousWidth or self.Height <> previousHeight then
previousWidth = self.Width
previousHeight = self.Height
end sub[/code]

In Open, put

If TargetWin32 Timer1.Mode = Timer.ModeOff end if

In the Resizing event, simply put


That way you get a Resizing event in the Resizing method, that will be called by the timer in Linux, and by the normal event in Windows.

Good walk around Michel, there is only the need to avoid the “resized” event (that still fire) until the mouse is released after the resize.

Another strange behavior in Linux is that the window (and all enclosed controls) are deactivated during window resize or move, thus as an example, if you have custom controls based on canvas they’re redraw using disabled apperance like when a window is not the frontmost.
It seems that other linux apps do not deactivate things during window move o resize.
Any walkaround for this?

Finally, my question is: are these two things bugs or intended behaviors on Linux?

The event does not happen if the window size does not change, so in practice, it is the same. But you can also start the timer in MouseDown and stop it in MouseUp.

You should file a bug report, to get a precise answer from Xojo.

It seems that without an active license you can not submit a case… curious…

Any news about the following issues:

  1. The resizing event of the window never fire on Linux (I’ve tried several Xojo versions thus I suspect that it never worked?!).
  2. When you resize or move the window under Linux the window (and all enclosed controls) are deactivated

It’s quite surprising that after many years of Linux support, basic things like window events are not bugs free.

I like finding simple cross-platform solutions so my workaround method that worked for me was:

in the Resized event
if not TargetLinux then // Linux handles this as resizing so ignore linux for now
//do anything you want to do for other platforms here
end if

in the Activate event
if TargetLinux then // Linux handles this after resized
//do anything you want to do for linux here
end if