Author Topic: Window left position is reseted after restart  (Read 3260 times)

tiagobar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Window left position is reseted after restart
« on: April 28, 2014, 18: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!

tiagobar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Window left position is reseted after restart
« Reply #1 on: April 28, 2014, 18: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.
« Last Edit: April 28, 2014, 21:07:51 by tiagobar »

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Window left position is reseted after restart
« Reply #2 on: May 05, 2014, 22:21:27 »
thanks, I've just set up a multi-screen virtual machine with VirtualBox and will try to reproduce it.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Window left position is reseted after restart
« Reply #3 on: May 11, 2014, 02: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.

tiagobar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Window left position is reseted after restart
« Reply #4 on: May 11, 2014, 23: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).

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: Window left position is reseted after restart
« Reply #5 on: May 12, 2014, 01: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.

tiagobar

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Window left position is reseted after restart
« Reply #6 on: May 12, 2014, 02: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!