Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#290 closed bug (invalid)

Graphical elements stretched wrongly

Reported by: Samir Hawamdeh Owned by:
Priority: normal Milestone: 4.0-2016R1
Component: foreign application Version: 4.0-nightly build
Severity: minor Keywords:
Cc: Roman Kargin OS Platform: AmigaOS4
Blocked By: Blocking:
Release Notes:

Description

Summary

Found anothed little graphical problem in Odyssey, in some circumstance the GUI interface will be "stretched" wrongly
It happen if you press F11 for go in fullscreen and then again you press F11 to come back in window mode

Pratically both buttons area and statusbar will be stretched so the graphical elements will not fit correcty as they should

But the issue is not immediately visible, to reproduce it you need to follow those steps

Steps to reproduce

  1. Open Odyssey and then press F11 (now you should be in fullscreen)
  2. Go to "Show" menu and tick on the statusbar
  3. Now you should be in fullscreen and the statusbar should be visible
  4. Now tick off the statusbar from menu 5- Press F11 again in order to come back in window mode

Expected results

Graphics element should be correctly mantained

Actual results

Some graphical elements are stretched wrongly (see image attached)

Attachments (3)

gui_stretched.png (41.4 KB) - added by Samir Hawamdeh 4 years ago.
Class1.c (12.2 KB) - added by Thore Böckelmann 4 years ago.
source of modified Class1 demo
Class1 (23.6 KB) - added by Thore Böckelmann 4 years ago.
modifed Class1 demo, 68k

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by Samir Hawamdeh

Attachment: gui_stretched.png added

comment:1 Changed 4 years ago by Thore Böckelmann

I cannot really tell what is going wrong in Odyssey here. It seems it doesn't restore the correct inner spacing. However, I prepared a modified Class1 demo which does exactly the same steps for maximizing and minimizing the window and the result is after minimizing is correct. Try it yourself.

comment:3 Changed 4 years ago by Thore Böckelmann

Resolution: fixed
Status: newclosed

In 5164:

  • Group.c: MUIA_Group_Forward will be ignored (again) when setting MUIA_Disabled, because nested objects must not be enabled while any of their parent objects is disabled. This closes #290.

comment:4 Changed 4 years ago by Thore Böckelmann

Resolution: fixed
Status: closedreopened

Sorry. Wrong ticket closed.

comment:5 in reply to:  1 Changed 4 years ago by Samir Hawamdeh

Replying to tboeckel:

I cannot really tell what is going wrong in Odyssey here. It seems it doesn't restore the correct inner spacing. However, I prepared a modified Class1 demo which does exactly the same steps for maximizing and minimizing the window and the result is after minimizing is correct. Try it yourself.

Indeed your demo work without problem
I suspect it could be somethings related to the statusbar, in my step by step points i forgot to mention this, but problem seems happen when you are in fullscreen and then you toggled on/off the statusbar .. (by default statusbar is not present when you press F11) at this point when you come back in window mode the stretch graphics happens

Maybe can you add a sort of statusbar in your example, ideally one that can be toggled on/off via menu
Some little elements might be added too, so to verify if those will mantain their correct position inside the statusbar

comment:6 Changed 4 years ago by Thore Böckelmann

Cc: Roman Kargin added

I added something similar to Odyssey's status bar, both at the top and at the bottom, but it makes no difference. No matter if and when the additional status bars are hidden/shown the window's inner spacing is always restored as expected.

I must add that Odyssey's handling of all the additional bars around the browser is not very consistent. Upon maximizing all bars are hidden and upon minimizing all bars are shown again, no matter if they are supposed to be visible or not. So I must assume there is something fishy happening in Odyssey. Furthermore there is no other place in the complete source where MUIA_InnerXXX is modified except the fullscreen handling, so any side effects by other classes can be ruled out.

Changed 4 years ago by Thore Böckelmann

Attachment: Class1.c added

source of modified Class1 demo

Changed 4 years ago by Thore Böckelmann

Attachment: Class1 added

modifed Class1 demo, 68k

comment:7 Changed 4 years ago by Thore Böckelmann

You can try the updated demo, but for me it still behaves correctly, no matter under which circumstances I switch between fullscreen and normal mode. As far as I can see Odyssey does it the same way, although it does it a bit more complicated by using own attributes and methods.

comment:8 Changed 4 years ago by Thore Böckelmann

Component: undefinedforeign application
Milestone: future release4.0-2016R1
Priority: undecidednormal
Resolution: invalid
Status: reopenedclosed

Having read the Odyssey source over and over again I finally noticed that it is possible to enforce the fullscreen mode multiple times, i.e. by the ARexx commands OPEN and FULLSCREEN. Every time Odyssey enters the fullscreen mode it remembers the former inner window spacing before it sets the new fullscreen spacing. However, if FULLSCREEN is used a second time while fullmode is still active Odyssey will remember the fullscreen spacing as normal spacing. Leaving fullscreen mode will then restore the remembered fullscreen spacing as normal spacing and you end up with the wrong spacing.

This happens because of this code passage in owbwindowclass.cpp:

	ULONG gofullscreen;

	if(msg->fullscreen == MV_OWBWindow_FullScreen_Toggle)
	{
		if(data->fullscreen == FALSE)
			gofullscreen = TRUE;
		else
			gofullscreen = FALSE;
	}
	else
	{
		gofullscreen = msg->fullscreen;
	}

If fullscreen mode is explicitly enabled or disabled instead of being toggled Odyssey does not respect the current fullscreen mode (data→fullscreen) and always switches to the demanded mode. This may happen more than once resulting in wrong inner window spacing.

To make it short: this is an Odyssey bug.

comment:9 Changed 4 years ago by Samir Hawamdeh

Mmm interesting, so it seems we have found another little culprit of Odyssey … thanks a lot for having looked at ;-)

Now the only question is, who will fix this ?
I mean can you add a patch in Odyssey code, or instead we need to ask kas1e for ?

Mate thanks again for your precious help

comment:10 Changed 4 years ago by Roman Kargin

Sure i can fix it, if only i know how :)

@Thore
If it not too much (but sure it is:) ), maybe you can show how code should be changed, so i can just copy+paste it. Thanks in advance

comment:11 in reply to:  10 Changed 4 years ago by Thore Böckelmann

Replying to kas1e:

@Thore
If it not too much (but sure it is:) ), maybe you can show how code should be changed, so i can just copy+paste it. Thanks in advance

That's very simple:

if(msg->fullscreen == MV_OWBWindow_FullScreen_Toggle)
{
	if(data->fullscreen == FALSE)
		gofullscreen = MV_OWBWindow_FullScreen_On;
	else
		gofullscreen = MV_OWBWindow_FullScreen_Off;
}
else
{
	gofullscreen = msg->fullscreen;
}

if(data->fullscreen == FALSE && gofullscreen == MV_OWBWindow_FullScreen_On)
{
	// switch to fullscreen mode
}
else if(data->fullscreen == TRUE && gofullscreen == MV_OWBWindow_FullScreen_Off)
{
	// switch back to normal mode
}

This ensures that the actual mode switch is done if and only if the current mode is different from the desired target mode.

Note: See TracTickets for help on using tickets.