multiple monitor loses window when single monitor

Bug #1578637 reported by Brian Degnan
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Version 4.0.2-stable
platform MacOS (Darwin 15.4.0)

If one uses KiCad with multiple monitors on a laptop, and then moves the KiCad window to the external monitor and then unplugs the external monitor, one cannot regain the window without reconnecting the external monitor to drag the window back to the primary monitor.

Related branches

Revision history for this message
xzcvczx (xzcvczx) wrote :

are you able to get to the window using mission control?

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

Is it KiCad specific problem? If you put the window of any other application to the desktop extension, then unplug the monitor of extended desktop, will application window go back to main monitor?

Changed in kicad:
status: New → Incomplete
Revision history for this message
Brian Degnan (degnan-68k) wrote : Re: [Bug 1578637] Re: multiple monitor loses window when single monitor

Please excuse the slow response, I was in the air. I wanted to reconfirm
the behavior.
The behavior is consistent with MissionControl.

It seems that where ever any KiCad application window was when it was
closed down; the program returns to the same monitor and there's not a way
to bring it back to focus. Is there a file somewhere that keeps these
settings that I could just blow away?

--bpd

On Thu, May 5, 2016 at 10:37 AM, Simon Wells <email address hidden>
wrote:

> are you able to get to the window using mission control?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1578637
>
> Title:
> multiple monitor loses window when single monitor
>
> Status in KiCad:
> New
>
> Bug description:
> Version 4.0.2-stable
> platform MacOS (Darwin 15.4.0)
>
> If one uses KiCad with multiple monitors on a laptop, and then moves
> the KiCad window to the external monitor and then unplugs the external
> monitor, one cannot regain the window without reconnecting the
> external monitor to drag the window back to the primary monitor.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1578637/+subscriptions
>

Revision history for this message
Brian Degnan (degnan-68k) wrote :

It is a KiCad specific problem; the behavior is repeatable.

On Fri, May 6, 2016 at 8:45 AM, Novak Tamas <email address hidden> wrote:

> Is it KiCad specific problem? If you put the window of any other
> application to the desktop extension, then unplug the monitor of
> extended desktop, will application window go back to main monitor?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1578637
>
> Title:
> multiple monitor loses window when single monitor
>
> Status in KiCad:
> New
>
> Bug description:
> Version 4.0.2-stable
> platform MacOS (Darwin 15.4.0)
>
> If one uses KiCad with multiple monitors on a laptop, and then moves
> the KiCad window to the external monitor and then unplugs the external
> monitor, one cannot regain the window without reconnecting the
> external monitor to drag the window back to the primary monitor.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1578637/+subscriptions
>

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

It seems a config file is written when kicad closes. On Win7 it is <user>\AppData\Roaming\kicad\kicad textfile, with items like
KicadFramePos_x=972
KicadFramePos_y=16
KicadFrameSize_x=935
KicadFrameSize_y=694
KicadFrameMaximized=0
Probably no checking at startup if coords are out of actual boundaries.

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

In Win 7 x64 it works well (BZR6783):

1 - I added a second (19" 1280x1024) monitor over my primary fullHD monitor
2 - Windows automatically set extended desktop
3 - I move eeschema window to 2nd monitor and set fullscreen on 2nd
4 - I quit all KiCad windows (eeschema and control panel)
6 - disconnect 2nd monitor
7 - When I start eeschema again, it's pushed back to 1st monitor.

Even better: if I disconnect 2nd monitor "on-the-fly" (while eeschema is running on 2nd monitor), eeschema will automatically jump back to 1st screen!!

Mac-men, please check it on your Apple box, as it seems platform specific.

Revision history for this message
xzcvczx (xzcvczx) wrote :

Attached is a patch that fixes the issue on osx i believe, I don't see it causing an issue on other platforms but please test and if the behaviour is worse than what happens by default then it can be ifdef'd for osx

Changed in kicad:
status: Incomplete → Confirmed
Revision history for this message
jean-pierre charras (jp-charras) wrote :

It could be better to use wxDisplay::GetFromWindow(). It allows a window to be partially outside the screen area.
Can you test it ?

Revision history for this message
Brian Degnan (degnan-68k) wrote :

I'll try to get time to apply the patch and build and try it out tonight.
I'll let you know.

On Tue, May 17, 2016 at 7:41 AM, jean-pierre charras <
<email address hidden>> wrote:

> It could be better to use wxDisplay::GetFromWindow(). It allows a window
> to be partially outside the screen area.
> Can you test it ?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1578637
>
> Title:
> multiple monitor loses window when single monitor
>
> Status in KiCad:
> Confirmed
>
> Bug description:
> Version 4.0.2-stable
> platform MacOS (Darwin 15.4.0)
>
> If one uses KiCad with multiple monitors on a laptop, and then moves
> the KiCad window to the external monitor and then unplugs the external
> monitor, one cannot regain the window without reconnecting the
> external monitor to drag the window back to the primary monitor.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1578637/+subscriptions
>

Revision history for this message
xzcvczx (xzcvczx) wrote :

@jp you are right that it limits off to the left and top of the screen, However after some initial testing while GetFromWindow looked good initially it will not really work either as if the window is over half off the screen then its also considered as not being on that display.

I am thinking of using GetFromPoint still but testing both the topleft and bottomright corners to see whether they are on the screen and if so leaving the coordinates... is this acceptable?

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

This is certainly acceptable.
Thanks to work on this issue.

Revision history for this message
xzcvczx (xzcvczx) wrote :

Attached is v2 which will check top left and bottom right. Is there any reason that m_FrameSize is a wxPoint instead of a wxSize?

Revision history for this message
xzcvczx (xzcvczx) wrote :

sorry attached is v3 which i think does stuff a bit better

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

Not yet perfect...
I committed you patch with enhancement in rev 6821.
Thanks.

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

woops sorry jp, idiot moment

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.

Other bug subscribers

Remote bug watches

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