-
February 2nd, 2022, 07:06 PM
#1
How to find out the size of a current screen in a multi-monitor system with XLib
Hello there, ladies and gentlemen,
I have a legacy program to support, and what I am trying to do in particular is to make sure the Maximize button works as expected. In my situation "as expected" means blowing a program window up to the screen limits. It works OK when I have a single monitor (I call ScreenOfDisplay() and then use the width and height members of the returned structure as size limits). However when I have multi-terminal system I would like it to work the same way, i.e. occupying the screen of the monitor the program window is displayed. But in that case the returned structure refers to the total (logical) display and returns the combined width/height. Therefore the question: how to find out the physical screen's size rather than logical one's?
And to add to the question... let say I drag the window from one physical screen (one monitor) to another, In that case I would like the program to be consistent and when maximized, occupy the "new" monitor's screen. That said, how to achieve that?
Thank you everyone for your help!
Mike
-
February 3rd, 2022, 03:07 AM
#2
Re: How to find out the size of a current screen in a multi-monitor system with XLib
I'd recommend you to look at this J.Newcomer's essay:
http://www.flounder.com/virtual_screen_coordinates.htm
Victor Nijegorodov
-
February 3rd, 2022, 03:29 PM
#3
Re: How to find out the size of a current screen in a multi-monitor system with XLib
Hi Victor,
and thank you for the link - it is really interesting. I am on a different page though - I am using XLib... If you have any idea how to determine a current physical screen dimensions using Xlib, i will greatly appreciate it!
BR,
Mike
-
February 3rd, 2022, 03:34 PM
#4
Re: How to find out the size of a current screen in a multi-monitor system with XLib
Sorry Mike!
But I have know idea what XLib is and how it differs from standard MFC/Win32/...
Victor Nijegorodov
-
February 4th, 2022, 05:22 PM
#5
Re: How to find out the size of a current screen in a multi-monitor system with XLib
Hi Victor,
it's OK. Thank you for your attetion anyway... I used to resolve this issue in Windows environment myself many years ago, but not in XLib, which is so different.
Spasibo!
Mike
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|