X Server - create a border around running application

prince_rakeem

New Member
Joined
Jan 15, 2022
Messages
4
Reaction score
2
Credits
36
Hi All,

I am using xinit to launch an application in X Server on my Pi4. The video mode is set to 720x400 so the application displays in a smaller area within the center of my TV. I am looking to add a white border around the running application window. Is it possible to load an image file (png) to create a border around the running application or is there another way to achieve what I am trying to do? I am basically trying to add something like the below image around the running application (its just a thin white border so a bit tough to see in the post unless you click to enlarge it):

white border.png
 
Last edited:


Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
7,021
Reaction score
5,862
Credits
45,919
G'day prince, Welcome to Linux.org

Did you by any chance try to add a url below your post ?
 
OP
prince_rakeem

prince_rakeem

New Member
Joined
Jan 15, 2022
Messages
4
Reaction score
2
Credits
36
G'day prince, Welcome to Linux.org

Did you by any chance try to add a url below your post ?
Hi Condobloke, thanks for the welcome :) No, I didn't try to add a url, I attached an image. it's tough to see (at least on my monitor) since it's just a rather thin white border. It's much easier to see if you click on it.
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
7,021
Reaction score
5,862
Credits
45,919
It actually appears invisible here. ....but it is there.

Someone will come along with the requisite knowledge to help you.

Be patient
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
10,681
Reaction score
9,174
Credits
88,672
If your resolution is only so big and the monitor's resolution is greater, your system is only writing that much data to the display output. You might be able to stretch it, but that's going to lower the fidelity of the images.

Can you increase the display resolution to match that of the TV? If you can do something like that, you can just set the background to white and that might resolve your issues.
 
OP
prince_rakeem

prince_rakeem

New Member
Joined
Jan 15, 2022
Messages
4
Reaction score
2
Credits
36
If your resolution is only so big and the monitor's resolution is greater, your system is only writing that much data to the display output. You might be able to stretch it, but that's going to lower the fidelity of the images.

Can you increase the display resolution to match that of the TV? If you can do something like that, you can just set the background to white and that might resolve your issues.
Thanks for your reply KGIII. Unfortunately, if the resolution is increased there is severe performance impact with the application. The real goal I am after is adding a thin white border to the running application. I have a USB device that acts as a mouse with a built-in camera which captures the display screen output and calculates where the user is pointing. The thin white border acts as a reference point so the the mouse/camera device understands when it is pointed outside of the displayed application.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
10,681
Reaction score
9,174
Credits
88,672
You know what? It'll vary based on your window manager - but you probably, somewhere, have the option to change the window decorations. I don't necessarily mean the the GUI but by hacking some config file.

Like, back in the LXDE days you could change window decorations with ~/.config/openbox/lubuntu-rc.xml and you could even assign decorations, or none, on a per-application basis. I believe that allowed for setting your own borders, including width and color. You had to learn the Openbox 'language', some sort of markup type of deal, and then you could make all sorts of customizations.

Now, this isn't an answer - but it's a direction you might try looking in. I'm not sure what's on offer with the various window managers as I never played with it much. I just know it was an option. It may be worth doing some research with 'window decorations' and your window manager.
 
OP
prince_rakeem

prince_rakeem

New Member
Joined
Jan 15, 2022
Messages
4
Reaction score
2
Credits
36
You know what? It'll vary based on your window manager - but you probably, somewhere, have the option to change the window decorations. I don't necessarily mean the the GUI but by hacking some config file.

Like, back in the LXDE days you could change window decorations with ~/.config/openbox/lubuntu-rc.xml and you could even assign decorations, or none, on a per-application basis. I believe that allowed for setting your own borders, including width and color. You had to learn the Openbox 'language', some sort of markup type of deal, and then you could make all sorts of customizations.

Now, this isn't an answer - but it's a direction you might try looking in. I'm not sure what's on offer with the various window managers as I never played with it much. I just know it was an option. It may be worth doing some research with 'window decorations' and your window manager.
Thanks for the tip KGIII. I will dig into this and report back.
 

Staff online

Members online


Latest posts

Top