Tk Source Code

Changes On Branch tip474-uniform-mouse-wheel
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch tip474-uniform-mouse-wheel Excluding Merge-Ins

This is equivalent to a diff from 4c6cdfa4 to 77c390ba

2019-07-24
13:31
(cherry-pick): Patch by Arjen sent to core 2018-09-21 Also, do some renumbering of mouse-buttons, such that at script level the XButtons appear to be at 4/5 while - internally - they are at 8/9. check-in: 93e45105 user: jan.nijtmans tags: tip474
2018-10-21
13:00
Bugfix [6e8afe516d]: rework of tkBind.c. check-in: 67dd75c7 user: gcramer tags: bug6e8afe516d, tip-532
2018-09-30
19:45
Branch to work on broken Tk display on macOS 10.14 Mojave check-in: 30ab59ea user: kevin_walzer tags: mac-mojave
10:00
Fix bitmap-4.1, color-4.1 and cursor-4.1 by cherrypicking the fix [ae13ed65] from trunk. Ticket [ad98f10b3a] dealt with trunk only, the problem appears to be seen in core-8-6-branch as well when running this Tk branch with core-8-branch of Tcl, on Linux Debian 8 at least. check-in: a1a0145c user: fvogel tags: core-8-6-branch
2018-09-29
14:44
Fix [4c84b11111]: Documentation error on page 'event' about <<ThemeChanged>> Closed-Leaf check-in: 919390e3 user: fvogel tags: bug-4c84b111113
2018-09-26
06:26
Fix [9658bc800c]: Right border calculated wrong in Tk menu if borderwidth != activeborderwidth. Patch provided by ingo_brunberg check-in: 2c451736 user: fvogel tags: bug-9658bc800c
2018-09-25
19:13
Fix [f792b457eb]: scrollbar-3.26, 3.27, 3.28, 3.35 tests fail on macOS. The fix consists in using the Linux code for the testmetrics command on macOS, instead of returning the width of the scrollbar (for both cxvscroll and cyvscroll requests). Closed-Leaf check-in: 62785e5e user: fvogel tags: bug-f792b457eb
2018-09-24
19:59
Fix [050d1ea747]: scrollbar-3.50, 6.11, 6.12, 6.25, 6.39 tests fail on macOS Closed-Leaf check-in: 3e32baa0 user: fvogel tags: bug-a84b20eddf, bug-050d1ea747
02:38
Restore some metrics from earlier Cocoa implementation of scorllbar because it seems to render more accurately and smoothly Closed-Leaf check-in: a978b090 user: kevin_walzer tags: mac-scrollbar-metrics-restore
2018-09-23
20:11
Create new branch named "fv-macos-scrollbar-tests" check-in: c514f967 user: fvogel tags: fv-macos-scrollbar-tests
19:57
Fix [874dca4873]: scrollbar-10.[12] fail on macOS check-in: bb66444f user: fvogel tags: bug-874dca4873
2018-09-22
17:59
Patch by Arjen sent to core 2018-09-21 Leaf check-in: 77c390ba user: oehhar tags: tip474-uniform-mouse-wheel
06:51
Fix [8229232472]: Cascade menu entry indicator wrong colour on Unix. Patch provided by cjmcdonald. check-in: 091bec93 user: fvogel tags: bug-8229232472
2018-09-09
16:04
Fix [719ae3991b]: ttk scrollbar-1.[23] tests fail (regression) Closed-Leaf check-in: 16fdad9d user: fvogel tags: bug-719ae3991b
2018-09-08
17:08
Fix [6fcaaa6f80]: ttk::entry insertion cursor not visible. Patch from Csaba Nemethi. check-in: 28b52309 user: fvogel tags: trunk
17:08
Fix [6fcaaa6f80]: ttk::entry insertion cursor not visible. Patch from Csaba Nemethi. check-in: 4c6cdfa4 user: fvogel tags: core-8-6-branch
16:41
Fix [382712ade6] (X11: 'event generate . <KeyPress>' segfaults) again with a different fix. Patch from Christian Werner. check-in: 1ada7439 user: fvogel tags: core-8-6-branch
2018-09-07
20:08
Ooops, one line should have been removed in previous commit. Plus: don't convert tab to spaces on otherwise unchanged lines Closed-Leaf check-in: 1eaf79fe user: fvogel tags: bug-6fcaaa6f80

Changes to generic/tkEvent.c.

586
587
588
589
590
591
592
593











594

595
596
597
598
599
600
601
	    | Button4Mask | Button5Mask;

    switch (eventPtr->type) {
    case ButtonPress:
	dispPtr = TkGetDisplay(eventPtr->xbutton.display);
	dispPtr->mouseButtonWindow = eventPtr->xbutton.window;
	eventPtr->xbutton.state |= dispPtr->mouseButtonState;












	dispPtr->mouseButtonState |= GetButtonMask(eventPtr->xbutton.button);

	break;

    case ButtonRelease:
	dispPtr = TkGetDisplay(eventPtr->xbutton.display);
	dispPtr->mouseButtonWindow = None;
	dispPtr->mouseButtonState &= ~GetButtonMask(eventPtr->xbutton.button);
	eventPtr->xbutton.state |= dispPtr->mouseButtonState;






|
>
>
>
>
>
>
>
>
>
>
>
|
>







586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
	    | Button4Mask | Button5Mask;

    switch (eventPtr->type) {
    case ButtonPress:
	dispPtr = TkGetDisplay(eventPtr->xbutton.display);
	dispPtr->mouseButtonWindow = eventPtr->xbutton.window;
	eventPtr->xbutton.state |= dispPtr->mouseButtonState;
	
	if (eventPtr->xbutton.button == 4 || eventPtr->xbutton.button == 5) {
	    /*
	     * Turn the event into a mouse wheel event and queue it
	     * Note: modelled after the code in tkWinX.c
	     */
	    eventPtr->type = MouseWheelEvent;
	    eventPtr->xany.send_event = -1;
	    eventPtr->xkey.nbytes = 0;
	    eventPtr->xkey.keycode = eventPtr->xbutton.button == 4? -1 : 1;
	    Tk_QueueWindowEvent(eventPtr, TCL_QUEUE_TAIL);
	} else {
	    dispPtr->mouseButtonState |= GetButtonMask(eventPtr->xbutton.button);
	}
	break;

    case ButtonRelease:
	dispPtr = TkGetDisplay(eventPtr->xbutton.display);
	dispPtr->mouseButtonWindow = None;
	dispPtr->mouseButtonState &= ~GetButtonMask(eventPtr->xbutton.button);
	eventPtr->xbutton.state |= dispPtr->mouseButtonState;