How to stop VLC window position from changing in Openbox? (Solved)

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
User avatar
dr__Dan
Posts: 83
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 52 times
Been thanked: 28 times

How to stop VLC window position from changing in Openbox? (Solved)

Post by dr__Dan »

I've noticed that VLC Media Player has unusual behavior when windowed: When I close it and reopen it, its y position goes up by the thickness of the titlebar. It continues to move with every closure and reopening, until the titlebar is hidden, after which it stops rising. I've noticed it on multiple computers and at least a few versions of Fatdog 64, but the internet didn't have any info that I could find on the matter, let alone a setting to adjust to prevent it. Does anyone have a solution? Is it Fatdog64-related? I don't particularly use other systems, so I can't easily test for the same behavior elsewhere.

Thanks,

Dan

9 years on with Fatdog64. :D

User avatar
amethyst
Posts: 2420
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Re: VLC window position question

Post by amethyst »

dr__Dan wrote: Tue Apr 27, 2021 4:55 am

I've noticed that VLC Media Player has unusual behavior when windowed: When I close it and reopen it, its y position goes up by the thickness of the titlebar. It continues to move with every closure and reopening, until the titlebar is hidden, after which it stops rising. I've noticed it on multiple computers and at least a few versions of Fatdog 64, but the internet didn't have any info that I could find on the matter, let alone a setting to adjust to prevent it. Does anyone have a solution? Is it Fatdog64-related? I don't particularly use other systems, so I can't easily test for the same behavior elsewhere.

Thanks,

Dan

Don't know if this is related but I have noticed that VLC's resume function sometimes messes up the original windows position. So, one would start a video and if you watched part of it before, a message will show at the top to ask whether you want to resume from a previous position. If you click one of the options, this windows re-positioning may occur. Set the video setting in VLC preferences to 'Always on top' and see if you have the same issues.

Last edited by amethyst on Tue Apr 27, 2021 1:35 pm, edited 1 time in total.
User avatar
Flash
Moderator
Posts: 978
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 52 times
Been thanked: 127 times

Re: How to stop VLC window position from changing?

Post by Flash »

This behavior isn't limited to VLC. I've noticed it when using other apps, including ROX-filer and different consoles and terminals. Perhaps it's done by JWM?

Chaos coordinator :?
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: How to stop VLC window position from changing?

Post by taersh »

I also think it's JWM.
The window of Retrovol mixer shows the same behavior.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

User avatar
Flash
Moderator
Posts: 978
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 52 times
Been thanked: 127 times

Re: How to stop VLC window position from changing?

Post by Flash »

I'm pretty sure I remember a thread in the old forum discussing this and how to prevent it.

Chaos coordinator :?
User avatar
gychang
Posts: 591
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 206 times
Been thanked: 64 times

Re: How to stop VLC window position from changing?

Post by gychang »

dr__Dan wrote: Tue Apr 27, 2021 4:55 am

I've noticed that VLC Media Player has unusual behavior when windowed: When I close it and reopen it, its y position goes up by the thickness of the titlebar. It continues to move with every closure and reopening, until the titlebar is hidden, after which it stops rising. I've noticed it on multiple computers and at least a few versions of Fatdog 64, but the internet didn't have any info that I could find on the matter, let alone a setting to adjust to prevent it. Does anyone have a solution? Is it Fatdog64-related? I don't particularly use other systems, so I can't easily test for the same behavior elsewhere.

Thanks,

Dan

modifying the jwm behavior may help. On my fossapup64, adding

<Group>
<Name>vlc</Name>
<Option>x:0</Option>
<Option>y:0</Option>
</Group>

to /etc/xdg/templates/_root_.jwmrc and restarting jwm or rebooting, will place it on left upper corner. Change the x / y values to change placement to your liking.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: How to stop VLC window position from changing?

Post by step »

I think Dan uses openbox (Fatdog64 carries JVM too as an option).

User avatar
dr__Dan
Posts: 83
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 52 times
Been thanked: 28 times

Re: How to stop VLC window position from changing?

Post by dr__Dan »

step is correct, it is happening using Openbox. I haven't noticed it on any other program, but I don't open and close most programs as often as I do VLC, and who looks for such things anyway? Has anyone else reproduced this? I wouldn't really care, but my wife wants to have an "X" to click on to close a window, not any alternative method for closing one.

@gychang: Thanks, I'll try to find a corresponding setting for Openbox. There appears to be a global setting, but I'll try to see about a program-specific option.

Dan

9 years on with Fatdog64. :D

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: How to stop VLC window position from changing?

Post by step »

@dr__Dan, look at /etc/xdg/openbox/rc.xml near line 589. There's a long comment that teaches how to do window-specific hacks. Copy the system file to ~/.config/openbox/rc.xml and edit your copy. Run openbox --reconfigure in a terminal to apply a change. Search the web for "openbox rc.xml" to find more examples.

User avatar
dr__Dan
Posts: 83
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 52 times
Been thanked: 28 times

Re: How to stop VLC window position from changing?

Post by dr__Dan »

@step, thanks, that's likely going to take care of it. Is there any evident cause for the VLC behavior I've mentioned?

Dan

9 years on with Fatdog64. :D

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: How to stop VLC window position from changing in Openbox? (Solved)

Post by step »

I don't know. Occasionally something like that happens to me with LibreOffice and even with a commercial application. Libre is based on GTK2; VLC and the commercial application on Qt5 (the commercial app runs on its own Qt5 libraries). What to make of this information? Anyway, my work-around is manual: with the off-screen window in focus I press Alt-space, M (for move), the down-arrow key a few times then ENTER. Even quicker, if you don't mind maximizing, is Alt-space X. Another thing you could try is changing the defaultmediaplayer handler to always start VLC maximized. Create file ~/.fatdog/defaultprograms and add this line:

Code: Select all

DEF_MEDIAPLAYER="vlc --fullscreen"

and reboot. This setting will apply to when vlc is started from rox (clicking a video icon) and the application menu.

Mind that in fullscreen mode there is no window title bar, so you'll see the menu bar directly below the top screen edge. If you want to always start in non-fullscreen mode replace --fullscreen with --no-fullscreen. By the way, VLC seems to remember the fullscreen setting, so if you close it once in fullscreen mode then start it again from a terminal window with no options (vlc), it should start in fullscreen mode, that is, without window title bar.

User avatar
dr__Dan
Posts: 83
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 52 times
Been thanked: 28 times

Re: How to stop VLC window position from changing in Openbox? (Solved)

Post by dr__Dan »

Well, neither method worked. I tried changing /etc/xdg/openbox/rc.xml to set y to 'center', '30', and '-30', and x to 'center', but got the same behavior. I also tried editing ~/.fatdog/defaultprograms as described for automatic 'no-fullscreen' operation, but it had no apparent effect. I don't want fullscreen or maximized. It has been my experience that VLC remembers window details, and the window size it opens with is consistent, only the y position gets shifted.

9 years on with Fatdog64. :D

User avatar
dr__Dan
Posts: 83
Joined: Tue Jul 28, 2020 5:06 am
Has thanked: 52 times
Been thanked: 28 times

Re: How to stop VLC window position from changing in Openbox? (Solved)

Post by dr__Dan »

After a little consulting with @step, this is the solution that did the trick, placed in the <applications>...</applications> section of ~/.config/openbox/rc.xml

Code: Select all

     <application name="vlc">
      <position force="yes">
        <x>center</x>
        <y>30</y>
      </position>
    </application>
 

The side effect is that VLC doesn't seem to want to go straight to fullscreen when I launch an optical video disc, but for me, since I use it as much for playing audio as video, it is an adequate trade-off.

Dan

9 years on with Fatdog64. :D

Post Reply

Return to “FatDog64”