• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-c誰得qtcocoapythonrubywindowsphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwitterdombtronvb.nettestarduinodirectxpreviewerゲームエンジン

K.Takata's patch queue for Vim


Commit MetaInfo

Revisionf2d69dd8bd76341f4caedcf31e7d8ac431199728 (tree)
Time2022-01-15 10:01:14
AuthorK.Takata <kentkt@csc....>
CommiterK.Takata

Log Message

Remove some ifdefs in permonitorv2 patch

Change Summary

Incremental Difference

diff -r 4c6a3ac4e6ba -r f2d69dd8bd76 win32-permonitorv2.patch
--- a/win32-permonitorv2.patch Sat Jan 15 09:44:53 2022 +0900
+++ b/win32-permonitorv2.patch Sat Jan 15 10:01:14 2022 +0900
@@ -285,15 +285,19 @@
285285 // _MSC_VER.
286286 # if !defined(LPNMTTDISPINFO) && defined(_MSC_VER)
287287 typedef struct tagNMTTDISPINFOA {
288-@@ -4178,6 +4249,7 @@ static int mouse_scroll_lines = 0;
288+@@ -4178,8 +4249,11 @@ static int mouse_scroll_lines = 0;
289289 static int s_usenewlook; // emulate W95/NT4 non-bold dialogs
290290 #ifdef FEAT_TOOLBAR
291291 static void initialise_toolbar(void);
292292 +static void update_toolbar_size(void);
293293 static LRESULT CALLBACK toolbar_wndproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
294294 static int get_toolbar_bitmap(vimmenu_T *menu);
295++#else
296++# define update_toolbar_size()
295297 #endif
296-@@ -4419,6 +4491,7 @@ set_tabline_font(void)
298+
299+ #ifdef FEAT_GUI_TABLINE
300+@@ -4419,6 +4493,7 @@ set_tabline_font(void)
297301 if (gui_w32_get_menu_font(&lfSysmenu) != OK)
298302 return;
299303
@@ -301,7 +305,27 @@
301305 font = CreateFontIndirectW(&lfSysmenu);
302306
303307 SendMessage(s_tabhwnd, WM_SETFONT, (WPARAM)font, TRUE);
304-@@ -4556,6 +4629,26 @@ destroy_sizing_tip(void)
308+@@ -4441,6 +4516,8 @@ set_tabline_font(void)
309+ */
310+ gui.tabline_height = tm.tmHeight + tm.tmInternalLeading + 7;
311+ }
312++#else
313++# define set_tabline_font()
314+ #endif
315+
316+ /*
317+@@ -4452,10 +4529,8 @@ set_tabline_font(void)
318+ if (n == SPI_SETWHEELSCROLLLINES)
319+ SystemParametersInfo(SPI_GETWHEELSCROLLLINES, 0,
320+ &mouse_scroll_lines, 0);
321+-#if defined(FEAT_GUI_TABLINE) && defined(USE_SYSMENU_FONT)
322+ if (n == SPI_SETNONCLIENTMETRICS)
323+ set_tabline_font();
324+-#endif
325+ return 0;
326+ }
327+
328+@@ -4556,6 +4631,22 @@ destroy_sizing_tip(void)
305329 return TRUE;
306330 }
307331
@@ -313,12 +337,8 @@
313337 + //TRACE("DPI: %d", ydpi);
314338 +
315339 + update_scrollbar_size();
316-+#ifdef FEAT_TOOLBAR
317340 + update_toolbar_size();
318-+#endif
319-+#if defined(FEAT_GUI_TABLINE) && defined(USE_SYSMENU_FONT)
320341 + set_tabline_font();
321-+#endif
322342 + gui_init_font(*p_guifont == NUL ? hl_get_font_name() : p_guifont, FALSE);
323343 + gui_mswin_get_menu_height(FALSE);
324344 + InvalidateRect(hwnd, NULL, TRUE);
@@ -328,7 +348,7 @@
328348
329349
330350 static LRESULT CALLBACK
331-@@ -4916,6 +5009,9 @@ destroy_sizing_tip(void)
351+@@ -4916,6 +5007,9 @@ destroy_sizing_tip(void)
332352 return MyWindowProc(hwnd, uMsg, wParam, lParam);
333353 return 1L;
334354 #endif
@@ -338,7 +358,7 @@
338358
339359 default:
340360 #ifdef MSWIN_FIND_REPLACE
341-@@ -5269,6 +5365,37 @@ gui_mch_prepare(int *argc, char **argv)
361+@@ -5269,6 +5363,37 @@ gui_mch_prepare(int *argc, char **argv)
342362 #endif
343363 }
344364
@@ -376,7 +396,7 @@
376396 /*
377397 * Initialise the GUI. Create all the windows, set up all the call-backs
378398 * etc.
379-@@ -5295,12 +5422,18 @@ gui_mch_init(void)
399+@@ -5295,12 +5420,18 @@ gui_mch_init(void)
380400 s_htearbitmap = LoadBitmap(g_hinst, "IDB_TEAROFF");
381401 #endif
382402
@@ -397,7 +417,7 @@
397417
398418 s_brush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
399419
400-@@ -5389,6 +5522,13 @@ gui_mch_init(void)
420+@@ -5389,6 +5520,13 @@ gui_mch_init(void)
401421 if (s_hwnd == NULL)
402422 return FAIL;
403423
@@ -411,7 +431,7 @@
411431 #ifdef GLOBAL_IME
412432 global_ime_init(atom, s_hwnd);
413433 #endif
414-@@ -5444,7 +5584,7 @@ gui_mch_init(void)
434+@@ -5444,7 +5582,7 @@ gui_mch_init(void)
415435 DragAcceptFiles(s_hwnd, TRUE);
416436
417437 // Do we need to bother with this?
@@ -420,7 +440,7 @@
420440
421441 // Get background/foreground colors from the system
422442 gui_mch_def_colors();
423-@@ -5586,11 +5726,11 @@ gui_mch_set_shellsize(
443+@@ -5586,11 +5724,11 @@ gui_mch_set_shellsize(
424444 GetWindowRect(s_hwnd, &window_rect);
425445
426446 // compute the size of the outside of the window
@@ -437,7 +457,7 @@
437457 #ifdef FEAT_MENU
438458 + gui_mswin_get_menu_height(FALSE)
439459 #endif
440-@@ -6491,16 +6631,16 @@ gui_mch_get_screen_dimensions(int *scree
460+@@ -6491,16 +6629,16 @@ gui_mch_get_screen_dimensions(int *scree
441461 get_work_area(&workarea_rect);
442462
443463 *screen_w = workarea_rect.right - workarea_rect.left
@@ -459,7 +479,7 @@
459479 #ifdef FEAT_MENU
460480 - gui_mswin_get_menu_height(FALSE)
461481 #endif
462-@@ -6958,6 +7098,9 @@ gui_mch_dialog(
482+@@ -6958,6 +7096,9 @@ gui_mch_dialog(
463483 # endif
464484 garray_T ga;
465485 int l;
@@ -469,7 +489,7 @@
469489
470490 # ifndef NO_CONSOLE
471491 // Don't output anything in silent mode ("ex -s")
472-@@ -6969,7 +7112,13 @@ gui_mch_dialog(
492+@@ -6969,7 +7110,13 @@ gui_mch_dialog(
473493 # endif
474494
475495 if (s_hwnd == NULL)
@@ -483,7 +503,7 @@
483503
484504 if ((type < 0) || (type > VIM_LAST_TYPE))
485505 type = 0;
486-@@ -7027,7 +7176,7 @@ gui_mch_dialog(
506+@@ -7027,7 +7174,7 @@ gui_mch_dialog(
487507 else
488508 # endif
489509 font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -492,7 +512,7 @@
492512 if (s_usenewlook)
493513 {
494514 oldFont = SelectFont(hdc, font);
495-@@ -7054,8 +7203,8 @@ gui_mch_dialog(
515+@@ -7054,8 +7201,8 @@ gui_mch_dialog(
496516 // We don't have a window, use the desktop area.
497517 get_work_area(&workarea_rect);
498518 maxDialogWidth = workarea_rect.right - workarea_rect.left - 100;
@@ -503,7 +523,7 @@
503523 // Leave some room for the taskbar.
504524 maxDialogHeight = workarea_rect.bottom - workarea_rect.top - 150;
505525 }
506-@@ -7064,17 +7213,17 @@ gui_mch_dialog(
526+@@ -7064,17 +7211,17 @@ gui_mch_dialog(
507527 // Use our own window for the size, unless it's very small.
508528 GetWindowRect(s_hwnd, &rect);
509529 maxDialogWidth = rect.right - rect.left
@@ -530,7 +550,7 @@
530550 }
531551
532552 // Set dlgwidth to width of message.
533-@@ -7110,7 +7259,8 @@ gui_mch_dialog(
553+@@ -7110,7 +7257,8 @@ gui_mch_dialog(
534554 if (last_white != NULL)
535555 {
536556 // break the line just after a space
@@ -540,7 +560,7 @@
540560 pend = last_white + 1;
541561 last_white = NULL;
542562 }
543-@@ -7135,12 +7285,15 @@ gui_mch_dialog(
563+@@ -7135,12 +7283,15 @@ gui_mch_dialog(
544564
545565 messageWidth += 10; // roundoff space
546566
@@ -561,7 +581,7 @@
561581
562582 /*
563583 * Check button names. A long one will make the dialog wider.
564-@@ -7228,7 +7381,7 @@ gui_mch_dialog(
584+@@ -7228,7 +7379,7 @@ gui_mch_dialog(
565585 dlgheight = maxDialogHeight;
566586 scroll_flag = WS_VSCROLL;
567587 // Make sure scrollbar doesn't appear in the middle of the dialog
@@ -570,7 +590,7 @@
570590 }
571591
572592 add_word(PixelToDialogY(dlgheight));
573-@@ -7325,14 +7478,14 @@ gui_mch_dialog(
593+@@ -7325,14 +7476,14 @@ gui_mch_dialog(
574594 p = add_dialog_element(p, SS_ICON,
575595 PixelToDialogX(dlgPaddingX),
576596 PixelToDialogY(dlgPaddingY),
@@ -588,7 +608,7 @@
588608 PixelToDialogY(dlgPaddingY),
589609 (WORD)(PixelToDialogX(messageWidth) + 1),
590610 PixelToDialogY(msgheight),
591-@@ -7626,7 +7779,7 @@ get_dialog_font_metrics(void)
611+@@ -7626,7 +7777,7 @@ get_dialog_font_metrics(void)
592612 else
593613 #endif
594614 hfontTools = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
@@ -597,7 +617,7 @@
597617
598618 if (hfontTools)
599619 {
600-@@ -7732,7 +7885,7 @@ gui_mch_tearoff(
620+@@ -7732,7 +7883,7 @@ gui_mch_tearoff(
601621 else
602622 # endif
603623 font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -606,7 +626,7 @@
606626 if (s_usenewlook)
607627 oldFont = SelectFont(hdc, font);
608628 else
609-@@ -8031,6 +8184,33 @@ initialise_toolbar(void)
629+@@ -8031,6 +8182,33 @@ initialise_toolbar(void)
610630 s_toolbar_wndproc = SubclassWindow(s_toolbarhwnd, toolbar_wndproc);
611631
612632 gui_mch_show_toolbar(vim_strchr(p_go, GO_TOOLBAR) != NULL);
@@ -640,7 +660,17 @@
640660 }
641661
642662 static LRESULT CALLBACK
643-@@ -8143,7 +8323,7 @@ GetTabFromPoint(
663+@@ -8124,9 +8302,7 @@ initialise_tabline(void)
664+
665+ gui.tabline_height = TABLINE_HEIGHT;
666+
667+-# ifdef USE_SYSMENU_FONT
668+ set_tabline_font();
669+-# endif
670+ }
671+
672+ /*
673+@@ -8143,7 +8319,7 @@ GetTabFromPoint(
644674 {
645675 TCHITTESTINFO htinfo;
646676 htinfo.pt = pt;
@@ -649,7 +679,7 @@
649679 if (s_tabhwnd == hWnd)
650680 {
651681 int idx = TabCtrl_HitTest(s_tabhwnd, &htinfo);
652-@@ -8189,7 +8369,8 @@ tabline_wndproc(
682+@@ -8189,7 +8365,8 @@ tabline_wndproc(
653683 {
654684 pt.x = GET_X_LPARAM(lParam);
655685 pt.y = s_pt.y;