Author Topic: Improper Window Placement when transfering settings to new computer  (Read 6175 times)

Offline Cool Javelin

  • Multiple posting newcomer
  • *
  • Posts: 22
Hello:

I recently purchased a new laptop, and wanted to use the settings from my desktop.

Laptop computer, Win10 64bit C::B v17.
Desktop computer, Win7 32bit C::B v16.

My desktop has multiple monitors, and, of course, the laptop has only one.

I copied the default.conf file from desktop C:\Users\Mark\AppData\Roaming\CodeBlocks into the similar location on the laptop.

I found and compiled one of my projects and when I went to debug, C::B loaded the debug perspective.

It turns out the watch window and others were on different monitors on the desktop, and did not display on the laptop.

No matter what I did, I could not correct the issue using C::B. I tried to de-click the little check boxes on the tool bar windows icon and other things.

Finally, I deleted the "defaults.conf" file and, of course, C::B recreated using the defaults and it works.

So, I guess I have a couple of choices.
#1) Open C::B on the desktop, start a debug session, move any windows that are on other monitors to my main monitor, stop debug, close out, then copy the config to the laptop.

#2) (I did not try this) On the laptop, start debug and try to get Windows to rearrange the windows somehow, (maybe right click Windows desktop ...)

This may not be so much of a bug as a feature request, but it took me a while to figure out what was happening.

Could C::B detect it is trying to open a window in a location that does not exist and, if so, change the coordinates of that window to something sane?

Thanks, Mark.

PS, One last thought while I write this, I guess the window settings, being in default.conf, are global and are the same across all the projects. I did not notice this, but thinking back all my projects look the same. It might be better to have each project have its own window settings.

M.


My 1st computer was an IBM System 360. We used punch cards. God help us when the runner dropped the boxes on the way to the computer room.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Improper Window Placement when transfering settings to new computer
« Reply #1 on: November 29, 2018, 11:48:28 pm »
PS, One last thought while I write this, I guess the window settings, being in default.conf, are global and are the same across all the projects. I did not notice this, but thinking back all my projects look the same. It might be better to have each project have its own window settings.
This would be super confusing and also it will be quite annoying...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Improper Window Placement when transfering settings to new computer
« Reply #2 on: December 05, 2018, 10:39:29 pm »
I have created a ticket for this https://sourceforge.net/p/codeblocks/tickets/770/
feel free to comment so you get notification as soon as we fix it...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Improper Window Placement when transfering settings to new computer
« Reply #3 on: December 06, 2018, 01:45:38 am »
Suggested solution: I think the user should use cb_share_config to move the configs from one computer to another.

Does this problem exist when using cb_share_config?

If yes; then, I think that changes are needed in cb_share_config instead of changes in CB core program.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Improper Window Placement when transfering settings to new computer
« Reply #4 on: December 06, 2018, 10:18:20 pm »
Quote
Suggested solution: I think the user should use cb_share_config to move the configs from one computer to another.
It is always a bug if the windows appear on an non existent display

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Improper Window Placement when transfering settings to new computer
« Reply #5 on: December 10, 2018, 02:09:14 pm »
I have posted a fix in the ticket. It would be cool if you can test it... But you have to compile c::b by yourself to test it...

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Improper Window Placement when transfering settings to new computer
« Reply #6 on: January 15, 2019, 12:01:03 pm »
fixed in trunk thank you for the report

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Improper Window Placement when transfering settings to new computer
« Reply #7 on: January 15, 2019, 01:15:16 pm »
There is a compilation error with wx3.1.2 because now wxDisplay has two constructors and both can match the call:

Code
const wxDisplay currentDisplay(0);

should be

Code
const wxDisplay currentDisplay;
« Last Edit: January 15, 2019, 01:27:11 pm by Miguel Gimenez »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Improper Window Placement when transfering settings to new computer
« Reply #8 on: January 15, 2019, 01:26:24 pm »
What wx version version are you using? What operating system? It compiles fine for me windows wx30

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Improper Window Placement when transfering settings to new computer
« Reply #9 on: January 15, 2019, 01:28:19 pm »
Sorry, I have just edited my message. wx3.1.2 added a second constructor to wxDisplay.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Improper Window Placement when transfering settings to new computer
« Reply #10 on: January 15, 2019, 02:01:59 pm »
Sorry, I have just edited my message. wx3.1.2 added a second constructor to wxDisplay.
i see.... Thank you. Fixed in trunk. I have switched my environment to wx312 for future builds