Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to change window position #158

Open
nullspaceprojects opened this issue Mar 30, 2024 · 9 comments
Open

Unable to change window position #158

nullspaceprojects opened this issue Mar 30, 2024 · 9 comments

Comments

@nullspaceprojects
Copy link

Make sure you are running the latest version before reporting an issue.

Hardware

Device Connection Method Screen Mobile Device Android Auto Version
Raspberry Pi 4 4GB USB Cable 1920x480 display Realme gt master edition v11

Installation Method: Install.sh

Description of problem:

I'm trying to change the window position to move it to the top left corner of my screen. I modified the run.sh script as such:

#!/usr/bin/env sh
/home/alex/dash/bin/dash 1120 480 0 50 >> /home/alex/dash/bin/dash.log 2>&1
sleep 1

I successfully changed the window's size but if I set the position coordinates nothing happens. The window stays fixed in the center of my screen regardless the position values I write.
Thanks.

Expected Result:

move window

@rsjudka
Copy link
Contributor

rsjudka commented Apr 2, 2024

that should work... that's primarily how I run dash

I haven't done it though the run script tho, I'll look into that

this is with starting dash on boot?

@rsjudka
Copy link
Contributor

rsjudka commented Apr 2, 2024

you can also try putting this in your dash config file
~/.config/openDsh/dash.conf

[Window]
pos=@Point(0 50)
size=@Size(1120 480)

@nullspaceprojects
Copy link
Author

Thanks for your reply. I did some tests. On rasp Debian 10 and 11 the [Window] field is working fine. On the contrary On debian 12 it is working fine. To get it working I had to disable Wayland and reactivate x11 by means of raspi-config. Might you do some tests in order to confirm what we discovered?Do I have to disable the on board bluetooth when I use the USB bluetooth dongle? Thanks

@rsjudka
Copy link
Contributor

rsjudka commented Apr 12, 2024

hmm weird... dont think i have a wayland setup but will see what it takes to properly validate that

i think you should be fine leaving the on-board one running (at least in terms of the pi interfacing with both of them) cant guarantee it wont cause any issues wireless AA tho (but also not saying it will)

@nullspaceprojects
Copy link
Author

Hi, Digging into the problem of not moving window into a Wayland environment, I found this in the Qt Docs under the function:

bool QWindow::startSystemMove()

"Furthermore, on some platforms such as Wayland, setPosition is not supported, so this is the only way the application can influence its position."

https://doc.qt.io/qt-5/qwindow.html#startSystemMove

Could u provide me a quick fix to the dash.cpp calling this function? It is enough to call window.startSystemMove(); at row 50 of dash.cpp?
I'm making some tests on the "bookworm" debian 12 distro with a raspberry pi 4.

Let me know. Thanks in advance

@rsjudka
Copy link
Contributor

rsjudka commented May 2, 2024

so reading up on it a bit, it might not be possible on wayland

"Wayland does not allow applications the ability to move their windows themselves" - quoting some person on reddit lol

@nullspaceprojects
Copy link
Author

It's ok, thanks. The last thing, and then u can close this issues, how i can change icon of widget Page? I loaded Apple car play app , and i Need to change icon, and change text, or make disappared the black line. What kind of SVG i must put in icons folder?
IMG_20240505_080604.jpg

@rsjudka
Copy link
Contributor

rsjudka commented May 8, 2024

if you wanted to override that icon (it looks like youre using the app launcher there?) the easiest is to probably replace this icon
https://github.com/openDsh/dash/blob/develop/assets/icons/widgets.svg

then you just need to rebuild and not worry about updating files anywhere in the code

"make the black line dissapear" you mean hide the thing that says "App" and the cog icon?

@nullspaceprojects
Copy link
Author

I tried as you say, I replaced the widgets icon (24x24 svg) and then recompiled, but as you can see there is only one square. then I replaced my icon with the original one, and the square remained, I noticed that only by recompiling a couple of times, the original icon reappeared. I'll do some tests again and then I'll tell you. then I intended to make the top bar with the app text and the gear icon disappear. (like the android auto page).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants