Comments (14)
This is done within the Desktop constructor
This code has never touched since 2010 ....
public Desktop() {
int wmargins = 90;
int hmargins = 60;
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
initComponents();
setBounds(wmargins, hmargins, screenSize.width - (wmargins * 2),
screenSize.height - (hmargins * 2));
DesktopPane.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
setVisible(true);
}
In my case (windows 3 multi-monitor) its always displayed on the main screen respecting the defined margins.
What is reported in your case ?
from ksar.
I have 3 separate examples. The first is a Debian 9/KDE 5 four monitor system. On this box the splash appears centered, but the main window appears large and off to the upper left. The second is a Laptop running centos 7 and KDE 4, in the case of a single monitor, everything is fine. In the case of dual monitors, the splash window appears in the middle of the two monitors as if it is treating them as one big unified screen, and the main window appears off to the left, but is not positioned correctly so what happens is that the app hangs over onto the right screen a bit. It's not a show stopper, the app is completely usable, it would just be nice to not have to move them every time.
from ksar.
If the app has only been designed to account for window placement on a windows desktop then this might not be something that can be done easily. I'm not sure how to go about it myself but I am looking into it. I even tried kde's ability to force windows to behave if they are considered "unmanaged" but in both 4 and 5 it doesn't seem to have much of an effect, yet.
from ksar.
this has not been designed for windows only .. its just to old that it respected multi-monitor support :)
I believe this might be your issue Rendering in a Multi-Screen Environment
Do you have the chance to debug to the mentioned code line and check for the reported screen size?
from ksar.
Could you please run the attached jar version (remove the .zip file extension)
ksar-5.2.4-SNAPSHOT-all.jar.zip
and provide the ksar_all.log output .. it should contain entries like this:
net.atomique.ksar.ui.Desktop - Screensize: java.awt.Dimension[width=1920,height=1200]
net.atomique.ksar.ui.Desktop - Screensize Screen[0][0]: java.awt.Rectangle[x=0,y=0,width=1920,height=1200]
net.atomique.ksar.ui.Desktop - Screensize Screen[1][0]: java.awt.Rectangle[x=1920,y=0,width=1920,height=1200]
net.atomique.ksar.ui.Desktop - Screensize Screen[2][0]: java.awt.Rectangle[x=-1920,y=109,width=1920,height=1080]]
from ksar.
Here's the log output, this was taken from a 4 monitor Debian 9 system running KDE 5. The montors are in this configuration:
....[X]......[1080].............
...[1080].[..4K..].[1080]
The main window appears about where that X is located and over hangs into the other monitors around it making it much easier to move then if it were completely off screen, so there's that at least. The splash is also off as it seems to simply appear in the center of the entire set of monitors. So in my case here it would be on the 4k monitor, slightly higher than the center of that screen, where as on a dual monitor system it appears halfway on the two screens, in the middle. The main window always appears off to the left somewhere close to but not exactly on the 0,0 point.
from ksar.
it seems that KDE returns the virtual coordinates .. even if there is no screen device
Screensize: java.awt.Dimension[width=7680,height=3240]
Screen[0][0]: java.awt.Rectangle[x=1920,y=1080,width=3840,height=2160]
Screen[1][0]: java.awt.Rectangle[x=5760,y=1898,width=1920,height=1080]
Screen[2][0]: java.awt.Rectangle[x=2880,y=0,width=1920,height=1080]
Screen[3][0]: java.awt.Rectangle[x=0,y=1956,width=1920,height=1080]
try this one - it will always only use the boundaries of screen[0] (in your case your 4K)
ksar-5.2.4-SNAPSHOT-all.jar.zip
from ksar.
Sorry I couldn't get back to you sooner, went out of town over the weekend. Looks like your code fixed the main window on my laptop with dual monitors. I made sure to disable any KDE rules too so it should be good. I'll test the 4 monitor setup when I get home this afternoon. The splash screen, however, is still broken on the dual monitor setup. It still appears right in the middle of them.
from ksar.
Sorry wanted to test the 4 monitor situation last night for you but got busy with Thanksgiving prep stuff so couldn't get around to it, I'll test it out tonight and let you know how it works.
from ksar.
I can confirm that the main window shows centered on the primary monitor in the case of both my 4k quad monitor setup, as well as my laptop with dual monitors. The splash still misbehaves but that's just an aesthetic thing. The program is, overall, much nicer for me to use now. Thanks for looking into this!
from ksar.
oh, did just realize that child windows misbehave too though. Like the about popup and the system preferences dialogue. They appear off screen and up to the left as the main window used to. Might want to check that out.
from ksar.
well, yes that's a mess since 5.1beta .. try this build .. this should fix all dialogs
ksar-5.2.4-SNAPSHOT-all.jar.zip
from ksar.
Yes, that seems to fix all dialogs, epic! Thanks!
from ksar.
Thanks for your help!
from ksar.
Related Issues (20)
- https://www.travis-ci.com/vlsi/ksar - not available ? Error 404 Not Found - Travis integration gone HOT 8
- How to add new data to be displayed ? HOT 3
- What is the relationship between this kSAR and sourceforge's kSAR? HOT 1
- build.gradle.kts - reports errors ? HOT 1
- spec null on ksar-5.2.3-all.jar HOT 1
- some messages on ksar-5.2.4-b396_gf0680721-SNAPSHOT-all.jar HOT 4
- Scale differences and are you deprecating solaris support? HOT 2
- Errors in reported memory HOT 1
- Export to pdf doesn't work HOT 1
- Logging - migrate from log4j to logback HOT 2
- CentOS 7 - SysStat 10.1.5-19.el7 : nothing in some graph HOT 9
- sar output - add LANGUAGE support
- JDK11
- Fails to connect to X HOT 5
- Display graphs for specified time range HOT 1
- Time for Release 5.2.4 HOT 3
- Next release should be 6.x.x HOT 1
- readme.md - remove changelog
- Timezone - How does it work HOT 2
- ERROR net.atomique.ksar.parser.Linux - unable to parse time HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksar.