While single-left-clicking on the "window frame" of Pcbnew, window jumps to bottom half of the screen.

Bug #1606378 reported by Mihkel Tedremaa
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Single-left-clicking on the "window frame" of Pcbnew, while right-click-options are revealed, window jumps to bottom half of the screen. See the screenshot attached.

1. Right click at any point of the layout
2. Left click on the window frame
3. see the window jumping to lower half of the screen

Application: kicad
Version: 4.0.2-stable release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Tags: pcbnew windows

Related branches

Revision history for this message
Mihkel Tedremaa (mihkeltedremaa) wrote :
xzcvczx (xzcvczx)
tags: added: pcbnew
tags: added: windows
Revision history for this message
Nick Østergaard (nickoe) wrote :

@Mihkel, can you try to retest with the latest nightlies?

I have a report that this does not happen with 6976 on win10 32bit.

Changed in kicad:
status: New → Incomplete
Revision history for this message
Nick Østergaard (nickoe) wrote :

He also tested it was 4.0.2. I suspect that it was simply your mouse that jumped.

Revision history for this message
Novak Tamas (novak-7) wrote :

Can't reproduce in Win7/x64 SP1, with 4.0.2 stable or 6936 nightly.

Still found a minor issue (both 4.0.2 and 6936) while testing the report..probably not related.

if I right-click on a stack of objects, Clarify Selection menu appears. I don't select anything, but click up on pcbnew's titlebar. When my mouse leaves titlebar, the "right-click to background" menu (Center, ZoomIn, ZoomOut, Grid..) appears at the mouse pointer, on the upper part of the window.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1606378] Re: While single-left-clicking on the "window frame" of Pcbnew, window jumps to bottom half of the screen.

On 7/31/2016 7:48 AM, Nick Østergaard wrote:
> He also tested it was 4.0.2. I suspect that it was simply your mouse
> that jumped.
>

@Nick, I'm sure this is a duplicate bug but I just searched for the
original bug report and could not find it. I will say that this bug is
still valid. I just confirmed it on my 64-bit win 10 build. I looked
at the context menu code a long time ago and fixing this problem is
probably not going to be easy. I believe it has something to do with
our current context menu handling code. Disabling the mouse warping
does not resolve the issue.

Revision history for this message
Michael Steinberg (decimad) wrote :

Hi, I was the one checking for Nick this afternoon. As I have 4.0.2 stable build with x64 on win10 as well, may I ask for further instructions on how to reproduce this bug? I clicked everywhere on the non-client- and title-bar-area while a context menu was open - nothing unusual happened.

Revision history for this message
Michael Steinberg (decimad) wrote :

Further clarification, this is no bug that only happens with touchpads, right?

Revision history for this message
jean-pierre charras (jp-charras) wrote :

It happens when a context menu (popup menu) is opened and later, closed by left clicking on the frame caption (dark blue area on the top of the frame on Windows)
This is a corner case.

It is due to the fact the mouse cursor is moved (by the kicad code) to its initial position
(what is expected) and then the left click is proceeded.

The attached patch should fix that (it allows the left click mouse event to be proceeded before moving the cursor).
I tested it on W7 32 bits, but it needs to be tested on different OS.

Revision history for this message
Mihkel Tedremaa (mihkeltedremaa) wrote :

Hey, guys.

Thanks for you comments.
It seems you understood what I meant.
Just in case I'll show a video of the issue - https://youtu.be/4TS0kpceREE

It was an issue with Windows 7 and now I migrated to win10 and the situation is exactly the same.

BR,
Mihkel

Changed in kicad:
status: Incomplete → Confirmed
Revision history for this message
Nick Østergaard (nickoe) wrote :

@JP, I have just tested your patch in #8 on archlinux and I can't see any wierd behaivour, but I couldn't before the patch either. Note this is with the i3 window manager.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

On 7/31/2016 2:42 PM, jean-pierre charras wrote:
> It happens when a context menu (popup menu) is opened and later, closed by left clicking on the frame caption (dark blue area on the top of the frame on Windows)
> This is a corner case.
>
> It is due to the fact the mouse cursor is moved (by the kicad code) to its initial position
> (what is expected) and then the left click is proceeded.
>
> The attached patch should fix that (it allows the left click mouse event to be proceeded before moving the cursor).
> I tested it on W7 32 bits, but it needs to be tested on different OS.
>
> ** Patch added: "fix_left_click_mouse_issue.diff"
> https://bugs.launchpad.net/kicad/+bug/1606378/+attachment/4711059/+files/fix_left_click_mouse_issue.diff
>

@JP, your patch fixes the issue on windows. I guess the fix wasn't as
complicated as I thought it would be. I tested Linux before I applied
the patch. Debian testing with Gnome's WM (at least my build) does not
suffer from this problem. Applying your patch didn't seem to break
anything on Linux but I didn't do any exhaustive testing. Can someone
test if this is a problem on OSX and then test with the patch to see if
it breaks anything? If the patch doesn't break anything on any
platform, I would prefer that we not add the #ifdef __WXMSW__/#endif
around wxSafeYield(). If the patch breaks anything than I guess we will
have to life with the conditional compilation.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@JP, I think this patch is ready to be committed to the product branch when you have the time. I'm going to commit it to the stable branch for the 4.0.3 release. Thanks.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Done

Changed in kicad:
status: Confirmed → Fix Committed
Revision history for this message
Mihkel Tedremaa (mihkeltedremaa) wrote :

Awesome, guys!

Thanks for quick response and actions. This bug was really annoying to me and my teammates.

Best regards,
Mihkel

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.