IDCMP_NEWSIZE after MoveWindow() - bug or feature?
  • Caterpillar
    Caterpillar
    Thomas
    Posts: 31 from 2004/3/31
    Since version 2.6 MorphOS sends an IDCMP_NEWSIZE message to an application after it called MoveWindow(). No other AmigaOS derivate/clone does this. Is it intended behaviour or a bug?

    For PicShow this means the window cannot be moved any more because when it receives IDCMP_NEWSIZE it interrupts the movement and scales the picture to the new window size (which actually hasn't changed).

    IMHO IDCMP_NEWSIZE should not be sent to a window if the size was not changed.
  • »05.12.10 - 15:17
    Profile
  • MorphOS Developer
    kiero
    Posts: 129 from 2003/2/28
    I'm not sure now as i don't work on intuition but this might be a sideeffect of a bugfix done to window resize code. Unfortunately we don't plan another quickfix release so a workaround would be best solution (just check if window size changed)

    [ Edited by kiero on 2010/12/5 18:32 ]
  • »05.12.10 - 18:31
    Profile Visit Website
  • Caterpillar
    Caterpillar
    Thomas
    Posts: 31 from 2004/3/31
    Thank you. I've added the workaround already. Hope this will be fixed anyway.
  • »05.12.10 - 19:34
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2985 from 2003/3/5
    From: Canada
    This on the other hand fixes resizing with old legacy apps, like MorphED/GoldED and I'm pretty sure I got the same messages with AmigaOS3.1.

    Since you're developping a new app, either account for this or use MUI like recommended for MorphOS.
  • »05.12.10 - 21:53
    Profile Visit Website
  • Caterpillar
    Caterpillar
    Thomas
    Posts: 31 from 2004/3/31
    Quote:


    jacadcaps wrote:
    I'm pretty sure I got the same messages with AmigaOS3.1.



    No, you definitely do not get a NEWSIZE message if you only move the window. You only get NEWSIZE if you change the window size.

    Surely you get IDCMP_CHANGEWINDOW when you programmatically change the window size/position (i.e. MoveWindow(), SizeWindow() or ChangeWindowBox()). And I would accept IDCMP_NEWSIZE from SizeWindow() and ChangeWindowBox(), even if the window's size did not change. But not from MoveWindow().
  • »06.12.10 - 15:10
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2985 from 2003/3/5
    From: Canada
    Well, I'll have a look when I'll have the time.

    A thing that comes to mind though: why would moving the window 'stop' when you receive an IDCMP? Surely you're not implementing dragging on your own (I really hope so).
  • »06.12.10 - 16:00
    Profile Visit Website
  • Caterpillar
    Caterpillar
    cheesegrate
    Posts: 35 from 2004/8/25
    From: north queensla...
    thomas what comic is your avatar from? i remember that character from a long time ago. thanks
  • »06.12.10 - 23:12
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12080 from 2003/5/22
    From: Germany
    > what comic is your avatar from?

    http://en.wikipedia.org/wiki/Mort_%26_Phil
  • »06.12.10 - 23:46
    Profile
  • Caterpillar
    Caterpillar
    Thomas
    Posts: 31 from 2004/3/31
    Quote:


    jacadcaps wrote:
    A thing that comes to mind though: why would moving the window 'stop' when you receive an IDCMP? Surely you're not implementing dragging on your own (I really hope so).


    I did this long ago and I won't change it now, especially as it worked in earlier versions of MorphOS and the very same code also works in AmigaOS 3, AmigaOS 4 and AROS.

    Quote:

    Well, I'll have a look when I'll have the time.


    That's great. While you are at it please also check why MoveWindow() does not allow the window to move out of the screen. The same happens for WindowAction() btw.


    [ Edited by Thomas on 2010/12/11 12:44 ]
  • »11.12.10 - 11:43
    Profile
  • Caterpillar
    Caterpillar
    Lizard
    Posts: 34 from 2004/4/27
    Quote:


    Thomas wrote:
    Quote:


    jacadcaps wrote:
    A thing that comes to mind though: why would moving the window 'stop' when you receive an IDCMP? Surely you're not implementing dragging on your own (I really hope so).


    I did this long ago and I won't change it now, especially as it worked in earlier versions of MorphOS and the very same code also works in AmigaOS 3, AmigaOS 4 and AROS.

    Quote:

    Well, I'll have a look when I'll have the time.


    That's great. While you are at it please also check why MoveWindow() does not allow the window to move out of the screen. The same happens for WindowAction() btw.


    [ Edited by Thomas on 2010/12/11 12:44 ]

    Not being able to drag windows out of the screen is a system setting. Check Prefs -> iControl -> Screens and Desktop.
    About halfway is an entry 'When dragging windows...'
  • »11.12.10 - 12:38
    Profile
  • Caterpillar
    Caterpillar
    Thomas
    Posts: 31 from 2004/3/31
    Other windows can be moved out of the screen. Only MoveWindow and the like limit the window to the screen.
  • »11.12.10 - 13:03
    Profile
  • MorphOS Developer
    Henes
    Posts: 507 from 2003/6/14
    Quote:


    Thomas wrote:
    That's great. While you are at it please also check why MoveWindow() does not allow the window to move out of the screen. The same happens for WindowAction() btw.


    I remember this one was made on purpose to prevent windows from being moved out of the screen with no way for the *user* to move them back.
    It makes sense to me and I doubt jaca wants to change that :)
  • »11.12.10 - 14:14
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2985 from 2003/3/5
    From: Canada
    Indeed, clipping coordinates to screen is intentional and isn't going to change. If you want offscreen dragging, the solution is to add a gadget to cover your window area (with type set to GTYP_WDRAGGING).
  • »12.12.10 - 12:22
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2985 from 2003/3/5
    From: Canada
    IDCMP_NEWSIZE on MoveWindow is fixed for 2.8. The limitation to screen boundaries isn't going to change though.
  • »17.12.10 - 20:19
    Profile Visit Website