Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Cool Javelin on November 29, 2018, 10:04:37 pm

Title: Improper Window Placement when transfering settings to new computer
Post by: Cool Javelin on November 29, 2018, 10:04:37 pm
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.


Title: Re: Improper Window Placement when transfering settings to new computer
Post by: oBFusCATed 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...
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: BlueHazzard 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...
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: stahta01 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.
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: BlueHazzard 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
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: BlueHazzard 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...
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: BlueHazzard on January 15, 2019, 12:01:03 pm
fixed in trunk thank you for the report
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: Miguel Gimenez 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;
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: BlueHazzard 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
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: Miguel Gimenez on January 15, 2019, 01:28:19 pm
Sorry, I have just edited my message. wx3.1.2 added a second constructor to wxDisplay.
Title: Re: Improper Window Placement when transfering settings to new computer
Post by: BlueHazzard 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