gmusicbrowser Forum

Main board => Questions => Topic started by: tiagobar on April 28, 2014, 13:48:47

Title: Window left position is reseted after restart
Post by: tiagobar on April 28, 2014, 13:48:47
When a change gmusicbrowser window position and quit it's saved on gmbrc file, but when I restart the left position is reseted to 1920! The top position remains unchanged.
I'm using a dual monitor system.
Any clue?

Thanks for the greatest music player!
Title: Re: Window left position is reseted after restart
Post by: tiagobar on April 28, 2014, 13:56:16
One more information:
When gmusicbrowser is on primary monitor the left position is reseted, but when it's on secundary monitor only the top position is reseted.

I'm using gmusicbrowser 1.1.12.
Title: Re: Window left position is reseted after restart
Post by: Quentin Sculo on May 05, 2014, 17:21:27
thanks, I've just set up a multi-screen virtual machine with VirtualBox and will try to reproduce it.
Title: Re: Window left position is reseted after restart
Post by: Quentin Sculo on May 10, 2014, 21:40:47
I've tried to reproduce the problem, and can't. Can you give me more details ? Such as what exactly is the position and size of the window before and after a restart ? Maybe a before and after screenshot could help.
Title: Re: Window left position is reseted after restart
Post by: tiagobar on May 11, 2014, 18:34:27
I am using Linux Mint 16 Cinnamon Edition (64 bits).
I tested in a fresh installed Linux Mint 16 Mate (32 bits) in a virtual machine and the behavior was the same with dual monitor (single monitor works ok).

First image shows the window position at 1505x92 that is saved when closed.
Second image shows the windows after restart, aligned margin right. The position in gmbrc is correct until this point (1505x92), then when it's closed again the incorrect value set is written (2234x92).
Title: Re: Window left position is reseted after restart
Post by: Quentin Sculo on May 11, 2014, 20:28:39
thanks, it should be fixed in git (http://git.gmusicbrowser.org/commit/c4df05b0e7)
Let me know if there are still problems.
And yes multiple monitors position is a bit strange, with a mix of relative and absolute positions, it's easy to get confused if you can't test it.
Title: Re: Window left position is reseted after restart
Post by: tiagobar on May 11, 2014, 21:25:21
Ok, I was testing a change of mine when I see your post!

-    $x=0 if $x<0; $x=$monitorwidth -$w if $x+$w>$monitorwidth;
+    $x=0 if $x<0; $x=$monitorwidth -$w+$xmin if $x+$w>$monitorwidth+$xmin;
-    $y=0 if $y<0; $y=$monitorheight-$h if $y+$h>$monitorheight;
+    $y=0 if $y<0; $y=$monitorheight-$h+$ymin if $y+$h>$monitorheight+$ymin;
-    $x+=$xmin;
-    $y+=$ymin;

I just get finished to test your patch too. Both seems to work with both single and dual monitor.

Thanks for your atention and great work!