All,
The MoveWindow() and MoveWindowStructure() functions take slightly
different parameters. The final TRUE argument in the original
MoveWindow() call[1] is for the formal parameter "front" which controls
whether the window should become the frontmost window. Unfortunately,
MoveWindowStructure() doesn't have the "front" parameter[2]. Patch
7.1.088 does not build on OS X with the extraneous TRUE argument to
MoveWindowStructure.
The function invocation should be:
MoveWindowStructure(gui.VimWindow, x, y);
(simply remove the final TRUE argument)
Michael Henry
[1]: http://developer.apple.com/documentation/mac/Toolbox/Toolbox-246.html
[2]:
http://tuvix.apple.com/documentation/macos8/HumanInterfaceToolbox/WindowManager/ProgWMacOS8.5WindowMgr/WindowMgr.42.html
Bram Moolenaar wrote:
>
> Patch 7.1.088 (extra)
> Problem: The coordinates used by ":winpos" differ from what getwinposx()
> and getwinposy() return.
> Solution: Use MoveWindowStructure() instead of MoveWindow(). (Michael Henry)
> Files: src/gui_mac.c
>
>
> *** ../vim-7.1.087/src/gui_mac.c Tue Jun 19 16:33:53 2007
> --- src/gui_mac.c Wed Aug 29 20:33:34 2007
> ***************
> *** 3149,3155 ****
> /* TODO: Should make sure the window is move within range
> * e.g.: y > ~16 [Menu bar], x > 0, x < screen width
> */
> ! MoveWindow(gui.VimWindow, x, y, TRUE);
> }
>
> void
> --- 3149,3155 ----
> /* TODO: Should make sure the window is move within range
> * e.g.: y > ~16 [Menu bar], x > 0, x < screen width
> */
> ! MoveWindowStructure(gui.VimWindow, x, y, TRUE);
> }
>
> void
> ***************
> *** 5556,5562 ****
> * SetDialogTracksCursor() : Get the I-beam cursor over input box
> * MoveDialogItem(): Probably better than SetDialogItem
> * SizeDialogItem(): (but is it Carbon Only?)
> ! * AutoSizeDialog(): Magic resize of dialog based on text lenght
> */
> }
> #endif /* FEAT_DIALOG_GUI */
> --- 5556,5562 ----
> * SetDialogTracksCursor() : Get the I-beam cursor over input box
> * MoveDialogItem(): Probably better than SetDialogItem
> * SizeDialogItem(): (but is it Carbon Only?)
> ! * AutoSizeDialog(): Magic resize of dialog based on text length
> */
> }
> #endif /* FEAT_DIALOG_GUI */
> *** ../vim-7.1.087/src/version.c Tue Aug 21 18:02:58 2007
> --- src/version.c Thu Aug 30 10:32:28 2007
> ***************
> *** 668,669 ****
> --- 668,671 ----
> { /* Add new patch number below this line */
> + /**/
> + 88,
> /**/
>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---