From: Jason Rumney Date: Sat, 9 Feb 2002 01:31:07 +0000 (+0000) Subject: (w32_load_system_font): Prevent Cleartype fonts from loading. X-Git-Tag: ttn-vms-21-2-B4~16754 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d65a9cdc6bd19f02980c00a30dc3cc2c13b41c90;p=emacs.git (w32_load_system_font): Prevent Cleartype fonts from loading. (Fx_show_tip): Ensure tip frames are above other topmost windows. --- diff --git a/src/w32fns.c b/src/w32fns.c index a269645c241..d7e0f7bcd0f 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -5816,6 +5816,10 @@ w32_load_system_font (f,fontname,size) ended up with. */ return NULL; + /* Specify anti-aliasing to prevent Cleartype fonts being used, + since those fonts leave garbage behind. */ + lf.lfQuality = ANTIALIASED_QUALITY; + font = (XFontStruct *) xmalloc (sizeof (XFontStruct)); bzero (font, sizeof (*font)); @@ -13708,9 +13712,17 @@ Text larger than the specified size is clipped. */) BLOCK_INPUT; compute_tip_xy (f, parms, dx, dy, PIXEL_WIDTH (f), PIXEL_HEIGHT (f), &root_x, &root_y); + + /* Put tooltip in topmost group and in position. */ SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, root_x, root_y, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE); + + /* Ensure tooltip is on top of other topmost windows (eg menus). */ + SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP, + 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + UNBLOCK_INPUT; goto start_timer; } @@ -13828,10 +13840,16 @@ Text larger than the specified size is clipped. */) AdjustWindowRect (&rect, f->output_data.w32->dwStyle, FRAME_EXTERNAL_MENU_BAR (f)); + /* Position and size tooltip, and put it in the topmost group. */ SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, root_x, root_y, rect.right - rect.left, rect.bottom - rect.top, SWP_NOACTIVATE); + /* Ensure tooltip is on top of other topmost windows (eg menus). */ + SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOP, + 0, 0, 0, 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); + /* Let redisplay know that we have made the frame visible already. */ f->async_visible = 1;