summaryrefslogtreecommitdiffstats
path: root/generic/tkEvent.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-25 17:51:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-25 17:51:31 (GMT)
commit238a90e4af0d54a079f512e7162a8bdc60ebc5db (patch)
treecbe0f9f1b1175cec0464ffc14205c8d42bddb4ed /generic/tkEvent.c
parentbaec2f6958d7f6e66f267e6c42e2fac04056ce30 (diff)
parent4f50f28c932648028f5e4056ea7fcd0fcf84b670 (diff)
downloadtk-238a90e4af0d54a079f512e7162a8bdc60ebc5db.zip
tk-238a90e4af0d54a079f512e7162a8bdc60ebc5db.tar.gz
tk-238a90e4af0d54a079f512e7162a8bdc60ebc5db.tar.bz2
Merge trunk
Diffstat (limited to 'generic/tkEvent.c')
-rw-r--r--generic/tkEvent.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 22a48f0..ef6393a 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -207,7 +207,6 @@ static Window ParentXId(Display *display, Window w);
static int RefreshKeyboardMappingIfNeeded(XEvent *eventPtr);
static int TkXErrorHandler(ClientData clientData,
XErrorEvent *errEventPtr);
-static void UpdateButtonEventState(XEvent *eventPtr);
static int WindowEventProc(Tcl_Event *evPtr, int flags);
static void CreateXIC(TkWindow *winPtr);
@@ -547,69 +546,6 @@ TkGetButtonMask(
/*
*----------------------------------------------------------------------
*
- * UpdateButtonEventState --
- *
- * Update the button event state in our TkDisplay using the XEvent
- * passed. We also may modify the the XEvent passed to fit some aspects
- * of our TkDisplay.
- *
- * Results:
- * None.
- *
- * Side effects:
- * The TkDisplay's private button state may be modified. The eventPtr's
- * state may be updated to reflect masks stored in our TkDisplay that the
- * event doesn't contain. The eventPtr may also be modified to not
- * contain a button state for the window in which it was not pressed in.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-UpdateButtonEventState(
- XEvent *eventPtr)
-{
- TkDisplay *dispPtr;
-
- switch (eventPtr->type) {
- case ButtonPress:
- dispPtr = TkGetDisplay(eventPtr->xbutton.display);
- dispPtr->mouseButtonWindow = eventPtr->xbutton.window;
- eventPtr->xbutton.state |= dispPtr->mouseButtonState;
-
- dispPtr->mouseButtonState |= TkGetButtonMask(eventPtr->xbutton.button);
- break;
-
- case ButtonRelease:
- dispPtr = TkGetDisplay(eventPtr->xbutton.display);
- dispPtr->mouseButtonWindow = None;
- dispPtr->mouseButtonState &= ~TkGetButtonMask(eventPtr->xbutton.button);
- eventPtr->xbutton.state |= dispPtr->mouseButtonState;
- break;
-
- case MotionNotify:
- dispPtr = TkGetDisplay(eventPtr->xmotion.display);
- if (dispPtr->mouseButtonState & ALL_BUTTONS) {
- if (eventPtr->xbutton.window != dispPtr->mouseButtonWindow) {
- /*
- * This motion event should not be interpreted as a button
- * press + motion event since this is not the same window the
- * button was pressed down in.
- */
-
- dispPtr->mouseButtonState &= ~ALL_BUTTONS;
- dispPtr->mouseButtonWindow = None;
- } else {
- eventPtr->xmotion.state |= dispPtr->mouseButtonState;
- }
- }
- break;
- }
-}
-
-/*
- *----------------------------------------------------------------------
- *
* InvokeClientMessageHandlers --
*
* Iterate the list of handlers and invoke the function pointer for each.
@@ -1206,8 +1142,6 @@ Tk_HandleEvent(
ThreadSpecificData *tsdPtr =
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
- UpdateButtonEventState(eventPtr);
-
/*
* If the generic handler processed this event we are done and can return.
*/