To: vim-dev@vim.org Subject: Patch 6.1.359 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.359 (extra) Problem: Mac Carbon: Vim doesn't get focus when started from the command line. Crash when using horizontal scroll bar. Solution: Set Vim as the frontprocess. Fix scrolling. (Peter Cucka) Files: src/gui_mac.c *** ../vim61.358/src/gui_mac.c Sun Oct 13 20:08:14 2002 --- src/gui_mac.c Tue Feb 25 19:50:39 2003 *************** *** 1560,1566 **** else /* Bottom scrollbar */ { sb_info = sb; ! page = W_WIDTH(sb->wp) - 5; } switch (partCode) --- 1560,1566 ---- else /* Bottom scrollbar */ { sb_info = sb; ! page = W_WIDTH(curwin) - 5; } switch (partCode) *************** *** 2816,2821 **** --- 2816,2834 ---- if (gui_win_x != -1 && gui_win_y != -1) gui_mch_set_winpos(gui_win_x, gui_win_y); + + #ifdef USE_CARBONIZED + /* + * Make the GUI the foreground process (in case it was launched + * from the Terminal or via :gui). + */ + { + ProcessSerialNumber psn; + if (GetCurrentProcess(&psn) == noErr) + SetFrontProcess(&psn); + } + #endif + return OK; } *************** *** 3400,3406 **** { Rect rc; ! rc.left = FILL_X(gui.col); rc.top = FILL_Y(gui.row) + gui.char_height - h; rc.right = rc.left + w; rc.bottom = rc.top + h; --- 3413,3425 ---- { Rect rc; ! #ifdef FEAT_RIGHTLEFT ! /* vertical line should be on the right of current point */ ! if (!(State & CMDLINE) && curwin->w_p_rl) ! rc.left = FILL_X(gui.col + 1) - w; ! else ! #endif ! rc.left = FILL_X(gui.col); rc.top = FILL_Y(gui.row) + gui.char_height - h; rc.right = rc.left + w; rc.bottom = rc.top + h; *************** *** 4302,4308 **** --- 4321,4331 ---- 0, /* current*/ 0, /* top */ 0, /* bottom */ + #ifdef USE_CARBONIZED + kControlScrollBarLiveProc, + #else scrollBarProc, + #endif (long) sb->ident); #ifdef DEBUG_MAC_SB printf ("create_sb (%x) %x\n",sb->id, orient); *** ../vim61.358/src/version.c Mon Feb 24 22:55:22 2003 --- src/version.c Tue Feb 25 19:50:10 2003 *************** *** 608,609 **** --- 612,615 ---- { /* Add new patch number below this line */ + /**/ + 359, /**/ -- TALL KNIGHT: Firstly. You must get us another shrubbery! OTHER KNIGHTS: More shrubberies! More shrubberies for the ex-Knights of Ni! ARTHUR: Not another shrubbery - "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///