Tk Source Code

View Ticket
Login
Ticket UUID: 525728
Title: window resize handles hiccup
Type: Bug Version: obsolete: 8.3.4
Submitter: nobody Created on: 2002-03-05 00:51:35
Subsystem: 68. Win Window Operations Assigned To: aku
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2026-10-23 16:14:54
Resolution: None Closed By: nobody
    Closed on:
Description:

On m.s. windows the resize handles seem to have a "hole" where they suddenly change back to the original pointer (e.g. an arrow) as you move the mouse over the left, right, or bottom edge (but strangely, not the top edge - i.e. at the title). Also the diagonal lower right corner.

To duplicate, simply run wish so you have the . window open. No code needed. However, this occurs on all toplevel windows.

Now, move the mouse left and right over the right hand border.

You will see the cursor change to <--> then blink back to the pointer, then the <--> a second time, then finally back to the cursor. This happens on all tcl/tk windows maybe 50% of the time.

This makes it difficult to grab hold of the windows edge to resize it.

In all other windows apps (i.e. not tcl/tk), this does not occur.

But tcl/tk seems to have a hole in the middle, where it might be losing focus or something. Often if you have the mouse positioned to resize, then press the mouse button, the slight movement (say 1 pixel) is enough to have the cursor change before you can "grab" it.

User Comments: jan.nijtmans added on 2026-10-23 16:14:54:

Thanks!

So, keeping open. Noting that "win-frame-cursor" is not the solution (yet)


nemethi (claiming to be Csaba Nemethi) added on 2026-10-23 15:41:39:

I don't think that we can close this ticket with "Works for me".

I can confirm that with the current main the resize cursor stays while the mouse moves over the border. OTOH, the reported flicker happens as before with the current core-9-0-branch (and probably with the current core-8-6-branch, too). And, what is even worse: the branch win-frame-cursor does not eliminate this when merged into core-9-0-branch. Very mysterious!


jan.nijtmans added on 2026-10-23 15:01:39:

> I cannot reproduce the flicker any more on Windows 11

So, can we close this ticket with "Works for me"?


serhiy.storchaka added on 2026-10-22 22:49:16:

I cannot reproduce the flicker any more on Windows 11 with current main: the resize cursor stays while the mouse moves over the border. Branch win-frame-cursor makes no visible difference here.


serhiy.storchaka added on 2026-09-23 21:10:30:
Confirmed on Windows 11 with Tk 9.1b1.

<code>TkWinChildProc</code> short circuits every <code>WM_SETCURSOR</code> message, and <code>WmProc</code> falls through to it for toplevels, so Windows never gets to set the resize cursors on the window frame -- they are shown only transiently, hence the flicker back to the arrow.

A fix is proposed in branch [/timeline?r=win-frame-cursor|win-frame-cursor]: short circuit only in the client area, where Tk sets the cursor itself, and let <code>DefWindowProcW</code> handle the non-client area.  Widget <code>-cursor</code> settings still work; the Windows test suite passes.

nobody added on 2006-04-18 10:21:16:
Logged In: NO 

This "twitchy" behavior does NOT happen on the top above 
the titlebar.

It's been noticed that: 

The twitching only occurs when moving outwards
from inside the window. But note the next comment:

One more data point: When running wish, with both
the console window and the blank toplevel window,
if you put the toplevel over the console (say in the
center of the console) and then move from the console
in towards the inside of toplevel, it again happens.

If the outer window is something else, say, notepad,
then it does not happen.

keithv added on 2006-04-17 21:51:31:
Logged In: YES 
user_id=442968

I've seen this exact behaviour in Adobe Reader, v7.0.7.