X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftoolbar-msw.c;h=5a4acfd7c412750260f974b79c133e73d31c8e0e;hb=ea1ea793fe6e244ef5555ed983423a204101af13;hp=1f978ccaf66f6e8634a99e8be90f852910bcccfd;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git diff --git a/src/toolbar-msw.c b/src/toolbar-msw.c index 1f978cc..5a4acfd 100644 --- a/src/toolbar-msw.c +++ b/src/toolbar-msw.c @@ -59,6 +59,9 @@ GetDlgItem(FRAME_MSWINDOWS_HANDLE(f), TOOLBAR_ID_BIAS + p) #define MSWINDOWS_BLANK_SIZE 5 #define MSWINDOWS_MINIMUM_TOOLBAR_SIZE 8 +static void +mswindows_move_toolbar (struct frame *f, enum toolbar_pos pos); + #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \ do { \ switch (pos) \ @@ -205,10 +208,11 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) { struct toolbar_button *tb = XTOOLBAR_BUTTON (button); - checksum = HASH4 (checksum, + checksum = HASH5 (checksum, internal_hash (get_toolbar_button_glyph(w, tb), 0), internal_hash (tb->callback, 0), - width); + width, + LISP_HASH (w->toolbar_buttons_captioned_p)); button = tb->next; nbuttons++; } @@ -459,6 +463,9 @@ mswindows_output_toolbar (struct frame *f, enum toolbar_pos pos) /* now display the window */ ShowWindow (toolbarwnd, SW_SHOW); + /* no idea why this is necessary but initial display will not + happen otherwise. */ + mswindows_move_toolbar (f, pos); if (button_tbl) xfree (button_tbl); @@ -524,6 +531,13 @@ mswindows_redraw_exposed_toolbars (struct frame *f, int x, int y, int width, } static void +mswindows_redraw_frame_toolbars (struct frame *f) +{ + mswindows_redraw_exposed_toolbars (f, 0, 0, FRAME_PIXWIDTH (f), + FRAME_PIXHEIGHT (f)); +} + +static void mswindows_initialize_frame_toolbars (struct frame *f) { @@ -635,5 +649,6 @@ console_type_create_toolbar_mswindows (void) CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars); + CONSOLE_HAS_METHOD (mswindows, redraw_frame_toolbars); }