summaryrefslogtreecommitdiffstats
path: root/win/tkWinX.c
Commit message (Collapse)AuthorAgeFilesLines
* * win/tkWinX.c (TkWinXInit): init default keyboard charsethobbs2006-04-051-8/+21
| | | | | | correctly. [Bug 1374119] (pajas) FossilOrigin-Name: f42bca1147263ff4027bc4df876be4225bdafa60
* * win/tkWinX.c (GenerateXEvent): correct %A translation onhobbs2005-02-281-8/+11
| | | | | | MouseWheel [Bug 1118340] FossilOrigin-Name: 1d667cb31a419ebdde754958ea55f6cd8f048f0e
* * generic/tkInt.h: Backport of shutdown safety mods from the HEADdavygrvy2004-10-271-5/+5
| | | | | | | | | | | | | | * generic/tkMenu.c: dating from 2003-12-21 * generic/tkUtil.c: * generic/tkWindow.c: * mac/tkMacButton.c: * unix/tkUnixEvent.c: * win/tkWin32Dll.c: * win/tkWinEmbed.c: * win/tkWinMenu.c: * win/tkWinX.c: FossilOrigin-Name: 9eb5a917089fb12e1052c4ac69deda9c2a92eee5
* * win/tkWinInt.h (TkWinDisplayChanged): added declhobbs2004-09-231-68/+106
| | | | | | | | | | * win/tkWinX.c (TkWinDisplayChanged, TkpOpenDisplay): Correctly * win/tkWinWm.c (InvalidateSubTreeDepth, WmProc): handle color and screen resolution changes. Tested for 16/24/32 bpp changes on XP. May need more fixes for 8bpp switch, use of special colormaps, or other special palette handling cases. [Bug 223689] FossilOrigin-Name: f63b0d0bbbbc410a7fbca3ce0c19a7b54422a6de
* * generic/tkInt.decls: Add decl for TkWinGetPlatformTheme.mdejong2004-09-231-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is only defined under Win32. * generic/tkIntPlatDecls.h: Regen. * generic/tkStubInit.c: Regen. * win/tkWinInt.h: Define TK_THEME_WIN_CLASSIC and TK_THEME_WIN_XP. * win/tkWinMenu.c (DrawMenuEntryAccelerator, DrawMenuEntryLabel): Draw a disabled 3D text highlight for the accelerator only with the Win95/98 look. Same goes for the menu entry text. * win/tkWinX.c (TkWinGetPlatformId, TkWinGetPlatformTheme): Automatically detect the Windows theme in use and return either TK_THEME_WIN_CLASSIC or TK_THEME_WIN_XP when the TkWinGetPlatformTheme function is invoked. [Patch 866194] * win/tkWinMenu.c: only provide a submenu handle when the MF_POPUP flag is given, fixing a recently-introduced crash when submenus are disabled. Also better error checking for this sort of situation in the future. * win/tkWinMenu.c (ReconfigureWindowsMenu): Fix drawing of a disabled (TkWinHandleMenuEvent, DrawMenuEntryArrow): cascade menu arrow. Tk was displaying a disabled cascade menu arrow in black instead of gray. This was caused by a bug in the Win32 code for user drawn menu items. The fix is to avoid telling Windows that the menu item is a cascade type and then draw the gray arrow bitmap on our own. [Patch 865842] * win/tkWinMenu.c (DrawWindowsSystemBitmap): Fix a strange Win32 bug where the logical coordinates returned by a call to DPtoLP are wrong the first time a menu is posted. This bug manifested itself by drawing the bitmap in the wrong place in a menu. The fix was to pass the newly created DC instead of the DC from the window. * win/tkWinMenu.c (DrawMenuEntryAccelerator): (DrawMenuEntryLabel): When drawing the label text and accelerator text for a disabled menu entry be sure to draw a 3D highlight. The only exception to this is when a disabled menu entry is highlighted, in that case do not draw a 3D hightlight. * win/tkWinMenu.c (DrawMenuEntryAccelerator, DrawMenuEntryArrow): Move the unused menu arrow drawing code in DrawMenuEntryAccelerator into a new function named DrawMenuEntryArrow. This makes no functional change but it will make it easier to fix things in the future. FossilOrigin-Name: e42dad6e91ffbd59e77f8378f5dd48f2fade4b1e
* * win/tkWinX.c: fix drawing of unicode chars in menuhobbs2004-05-031-1/+5
| | | | | | | * win/tkWinInt.h (TkWinProcs): titles. [Bug #904371] (riefenstahl) * win/tkWinMenu.c (ReconfigureWindowsMenu): FossilOrigin-Name: 2173eb5c721551091dc897329cb81fede4e26704
* * generic/tkClipboard.c: Move TkClipCleanup from tkClipboard.chobbs2004-05-031-1/+49
| | | | | | | | | | | * mac/tkMacXStubs.c: to being implemented in a platform * macosx/tkMacOSXXStubs.c: specific manner. The cleanup order was * unix/tkUnixEvent.c: bad at least on Windows, where we * win/tkWinX.c: reset/cleared display info that was still needed for the clipboard to render. [Bug #939389, #822002, #732662] FossilOrigin-Name: 08825fb396bbe18cbace4b256f4e8f4216c4e9b5
* * generic/tkInt.decls: add TkWinSetHINSTANCE declhobbs2002-12-081-4/+29
| | | | | | | | | | | | * generic/tkIntPlatDecls.h: regen * generic/tkStubInit.c: regen * win/tkWinInit.c (TkpInit): While init and cleanup aren't correct * win/tkWinX.c (TkWinXInit): in DllMain, we had to specify the * win/tkWin32Dll.c (DllMain): true HINSTANCE or the resources of a dynamic Tk weren't being loaded correctly. Created a new function TkWinSetHINSTANCE for this purpose. FossilOrigin-Name: 07dfcd13bcbf8c38b20c8e156f51d25ace1d615d
* * win/tkWinX.c (TkWinXInit): Move cleanup into an exit handlerhobbs2002-12-061-1/+7
| | | | | | | | * win/tkWin32Dll.c (DllMain): to ensure that it will be called * win/tkWinWm.c (TkWinWmCleanup): without having to unload the dll. Also reset the static int initialized on cleanup to allow reinit. FossilOrigin-Name: f4d362d9f2b0cfab700ab4f1b951f2a665b86318
* * generic/tkBind.c (TkBindDeadWindow):mdejong2002-06-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle case where Tk_DestroyWindow is invoked on clipboard and send windows. * generic/tkClipboard.c (TkClipCleanup): Invoke Tk_DestroyWindow to cleanup the dispPtr->clipWindow. Call Tcl_Preserve and Tcl_Release on the window to avoid an invalid memory ref on shutdown. * generic/tkEvent.c (Tk_HandleEvent): Panic if XCreateIC is invoked twice for the same window. This should never happen, the check were just added to make sure it does not since this could lead to crashes in XCloseIM. * generic/tkFocus.c (TkFocusDeadWindow): Handle case where Tk_DestroyWindow is invoked on clipboard and send windows. * generic/tkOption.c (TkOptionDeadWindow): Ditto. * generic/tkWindow.c (TkCloseDisplay): Move deletion of dispPtr->winTable after TkpCloseDisplay call since Tk_DestroyWindow uses it and could be called by TkpCloseDisplay for clipboard/send windows. Also invoke ckfree for the dispPtr instead of doing it in TkpCloseDisplay. (Tk_DestroyWindow): Check for a null winPtr->mainPtr before doing certain cleanup tasks so the we can invoke Tk_DestroyWindow on clipboard and send windows. We need to do this so that XDestroyIC will get invoked for the input contexts of each window. * mac/tkMacXStubs.c (TkpCloseDisplay): Don't free the displayPtr since this is now done in TkCloseDisplay. * unix/tkUnixEvent.c (TkpCloseDisplay, OpenIM): Remove conditional compilation around calls to XCloseIM since I am confident that the crashes related to input contexts has been fixed. Don't free the displayPtr since this is now done in TkCloseDisplay. * unix/tkUnixSend.c (TkSendCleanup): Invoke the Tk_DestroyWindow method to cleanup the special send window. This will call XDestroyIC and thereby avoid a crash in XCloseIM. The send window needs to be Tcl_Preserve and Tcl_Release to avoid an invalid memory ref on shutdown. * win/tkWinX.c (TkpCloseDisplay): Don't free the displayPtr since this is now done in TkCloseDisplay. FossilOrigin-Name: 2b1442c6d82bdff73ad6575cabf7539bf0295292
* * generic/tkCmds.c (Tk_TkObjCmd):hobbs2002-06-171-13/+16
| | | | | | | | | | | | * generic/tkInt.h (struct TkCaret): * mac/tkMacXStubs.c (Tk_SetCaretPos): * unix/tkUnixKey.c (TkpGetString, Tk_SetCaretPos): * win/tkWinX.c (Tk_SetCaretPos): * tests/tk.test: Added 'tk caret' implementation of TIP#96 * doc/SetCaret.3 (new): which adds a TkCaret structure element to * doc/tk.n: TkDisplay for maintaining state. FossilOrigin-Name: 6be89a7feefdd57fd30aca27c701f6e155497b67
* * win/tkWinX.c (Tk_SetCaretPos): remove WM_IME_STARTCOMPOSITIONhobbs2002-04-121-37/+118
| | | | | | | | | | | | | and place the IME position within Tk_SetCaretPos. Cache results in Tk_SetCaretPos to reduce unnecessary repositioning. Also call DestroyCaret if we receive WM_KILLFOCUS. (TkpOpenDisplay): ZeroMemory the initial display structures. (TkWinGetUnicodeEncoding): Added so that Windows only needs to cache this value one, and then free it in TkWinXCleanup. (HandleIMEComposition): add support for Win98 and ATOK13 IME. (yamamoto) FossilOrigin-Name: 584decd87473126d02435d2e43ce6c28441284fd
* * win/tkWinX.c: added Tk_SetCaretPos code to position IME windowshobbs2002-04-051-1/+87
| | | | | | correctly when WM_IME_STARTCOMPOSITION is received. FossilOrigin-Name: 82d048b498cb9bcf2daa024e16081601dcd096a2
* * win/tkWinX.c: Define _WIN32_IE as 0x0300mdejong2002-03-071-1/+12
| | | | | | | | before including commctrl.h so that we can access the InitCommonControlsEx API when building Tk with mingw. FossilOrigin-Name: c524eb8b1f8def1b4a0a56b6c16c5c7ed553289d
* * Updated callers of Tcl_SplitList and Tcl_Merge.dgp2002-01-251-4/+4
| | | | | | | | | | | * Updated callers of Tcl_GetStringResult. Rewrote PrintScrollFractions to ScrollFractions to stop scribbling directly on interp->result. * Updated callers of Tcl_GetVar, Tcl_GetVar2 * Updated callers of Tcl_SplitPath, Tcl_JoinPath, and Tcl_TranslateFileName. FossilOrigin-Name: 933dcfe881579bb3925ff2a05e925a0bd8d67087
* * win/tkWinInt.h:hobbs2001-12-281-1/+37
| | | | | | | | | | * win/tkWinX.c: added TkWinProcs that represent a function table to switch between unicode and ansi procs on Windows. This is analogous to the TclWinProcs. Using Tcl_WinUtfToTChar, we can easily take advantage of using unicode functions where available without having to switch on the platform id each time. FossilOrigin-Name: 081e2c0707adca6861223d368262ad2bf2816ec5
* * win/tkWinX.c (TkWinXInit): added InitCommonControlsEx call.hobbs2001-11-101-1/+13
| | | | | | | | | | | * win/rc/tk.rc: * win/rc/wish.rc: * win/rc/wish.exe.manifest: added resources that specify using v6 of the MS Common Controls library when available (WinXP+). This enables use of the themeable widgets (like scrollbars) to be used in Tk. [Patch #478933] FossilOrigin-Name: 7cd5f27018339066c27d50626bb19e752fba4111
* (TkGetServerInfo): added recognition of Win64hobbs2001-09-211-4/+10
| | | FossilOrigin-Name: 8ea999e98e7495584e2aa2ea9333b5d6e9aad39c
* * win/configure: Regen.mdejong2001-06-231-1/+7
| | | | | | | | | * win/tcl.m4 (SC_CONFIG_CFLAGS): Link to the imm32 library when building with mingw gcc. * win/tkWinX.c: Include the imm.h header to fix compiling with mingw gcc. FossilOrigin-Name: e3e493f97716ab52679c32d79dc0c08507a8e735
* * win/tkWinX.c: moved the initialization of tkPlatformId fromhobbs2001-05-301-10/+11
| | | | | | | TkWinXInit to TkWinGetPlatformId because static builds could call it before it was initialized. [Bug #427278] FossilOrigin-Name: 0a94e34e9f35522faf20c96c321c2c998a26ba18
* * win/makefile.vc:hobbs2001-03-301-8/+232
| | | | | | | | | | | * win/configure: * win/tcl.m4: added imm32.lib to LIBS_GUI for Tk IME support. * win/tkWinInt.h: * win/tkWinKey.c: * win/tkWinX.c: added support for changing IME on the fly in Windows (2000). (lam) [Patch #402993] FossilOrigin-Name: 7d37d3f469f0662f50fc1661d1f02bc0060ca9c8
* * generic/tkFileFilter.c (AddClause): Cast to match function prototype.mo2000-07-061-3/+1
| | | | | | | | | | | | | | | | | * win/stubs.c (_XInitImageFuncPtrs): Add return value for function. * win/tkWinButton.c (buttonStyles, ButtonBindProc, ComputeStyle): Remove unused declarations. * win/tkWinColor.c (GetColorByName, GetColorByValue): Remove unused function declarations. * win/tkWinDialog.c (TrySetDirectory): Remove unused function declaration. * win/tkWinEmbed.c (TkWinEmbeddedEventProc): Cast to match function prototype. * win/tkWinMenu.c (winMenuMutex, MenuExitProc): Remove unused declaration. * win/tkWinWindow.c (StackWindow): Remove unused declaration. * win/tkWinWm.c (ConfigureEvent): Remove unused declaration. * win/tkWinX.c (winXMutex): Remove unused declaration. * xlib/ximage.c (XCreateBitmapFromData): Cast to match function prototype. FossilOrigin-Name: 51f47c0c03aff365cd11fd45c22dc16f8da2f17a
* * win/tkWinPointer.c: Changed Mod2Mask in TkWinGetModifierState toericm2000-04-191-2/+2
| | | | | | | | | | | | | | | | | | ALT_MASK, to fix some event problems [Bugs: 1160, 5088]. * win/tkWinX.c: Changed Mod2Mask in GetState to ALT_MASK, to fix some event problems [Bugs: 1160, 5088]. * generic/tkInt.h: Moved definition of ALT_MASK and META_MASK here so that it would be accessible from other modules than tkBind.c. * generic/tkBind.c: Added code in BindEvent to check for ALT_MASK and META_MASK in the event state field, as this field may not be set up with the correct display modifier mask bits if the XEvent structure was created by [event generate] or by the Windows X emulation. [Bugs: 1160, 5088]. FossilOrigin-Name: c62394546f5315ab8053ba1dc769ee48089d0bfb
* * test/winClipboard.test:hobbs2000-04-121-5/+40
| | | | | | | | | | | | | | * win/tkWinInt.h: * win/tkWinClipboard.c (UpdateClipboard): * win/tkWinX.c (GenerateXEvent): added updatingClipboard tsd and TkWinUpdatingClipboard accessor function to allow us to flag ourselves when we are the ones updating the clipboard. This corrected inability to create our own clipboard types within a Tk application. [Bug: 2338 4318] * win/tkWinTest.c (TestclipboardCmd): improved TestclipboardCmd with better error handling and obj'ification FossilOrigin-Name: 6afe91c34422fd4d580eb8122ad3815c4612f685
* * win/tkWinDialog.c: added unicode-aware open/save file dialogshobbs2000-03-311-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | * win/tkWinFont.c (TkpFontPkgInit): move private ref to platformId to TkWinGetPlatformId * win/tkWinMenu.c (SetDefaults): moved private use of versionInfo to TkWinGetPlatformId and removed all code for (versionInfo.dwMajorVersion < 4) (== Win32s) * win/tkWinX.c: * win/tkWin32Dll.c: moved TkWinGetPlatformId to tkWinX.c * win/tkWinInit.c: added TkWinXInit to TkpInit to ensure that its called for static Windows shells. [Bug: 3647] * win/tkWinInt.h: * win/tkWinX.c: * win/tkWinDraw.c (SetUpGraphicsPort): * win/tkWinScrlbr.c (UpdateScrollbar): removed use of tkpIsWin32s * win/tkWinInt.h (TkWinDCState struct): added bkmode value * win/tkWinDraw.c (TkWinGetDrawableDC, et al): added support for properly transparent dashed lines on Windows. [Bug: 4617] FossilOrigin-Name: 4da507a963ef135744aef559227cc6d7a4335951
* * win/tkWinInt.h: removed TkFontAttributes typedef (washobbs1999-11-191-2/+2
| | | | | | | | | | redundant with tkFont.h). * win/tkWinPort.h: put #ifndef __GNUC__ around redefinition of str[n]casecmp, as cygwin uses the originals. * win/tkWinX.c: changed GetCurrentTime to GetTickCount (the former is deprecated). [Bug: 2053] FossilOrigin-Name: 9817763038db6ca12771e36e2114bdb5b71fd3ca
* * tests/unixSelect.test: Fixed broken test.stanton1999-07-091-2/+1
| | | | | | | | | | | | * win/makefile.vc: Added special case target to ensure that tkStubLib.obj is built with -DSTATIC_BUILD. * win/tkWinX.c (TkWinChildProc): Changed to pass WM_WINDOWPOSCHANGED through to DefWindowProc to make OpenGL sub-windows happy. This allows Windows to generate the WM_SIZE and WM_MOVE messages. FossilOrigin-Name: bc661b9f3a4ccb0207118496cfb6dace7bc92482
* * Merged 8.1 branch into the main trunkstanton1999-04-161-26/+98
| | | FossilOrigin-Name: 1120dc4257448ed1955333e682de48e2940cc741
* Added support for the MouseWheel event.rjohnson1998-10-101-1/+28
| | | FossilOrigin-Name: 36ac110bcfabe39cd0f8f0af96e59dd73d52646e
* Replaced SCCS strings, fixed binary filesstanton1998-09-141-1/+1
| | | FossilOrigin-Name: fb58b663f313796e8ed3115f92d657f0cae1d575
* added WM_SYSCHAR/WM_MENUCHAR handlingstanton1998-08-041-1/+15
| | | FossilOrigin-Name: 986ef840949201e04b683e48e622f8ed00fcbc0c
* Initial revisionrjohnson1998-04-011-0/+1020
FossilOrigin-Name: 2bf55ca9aa942b581137b9f474da5ad9c1480de4