Such a modification would close this issue that is still open for
years — as you can see from the example links provided, it causes a
lot of problems for programmers.
What do you think about this?
--
regards,
Zbigniew
that should be returned by
DisplayWidth and DisplayHeight functions.
So I would expect (in my particular case) to get 1920 and 1200 values,
and NOT dimensions of virtual screen, I mean 2520 and 1575
--
regards,
Zbigniew
ual screen is used,
they still should return proper values regardless of method used for
panning. The programmer shouldn't be bothered with this („maybe the
user of my program will use Randr?”, „maybe he'll use X extension?”,
„maybe Y extension?” etc.).
Is the above clear enough for you?
--
regards,
Zbigniew
> What you want is to find out the width and height of physical screen you
> have.
Indeed. That's what DisplayWidth and DisplayHeight functions have been
created for.
> To do that you need to use the subsystem that manages them - which
> is xrandr. And don't forget to specify which of 5 screen yo
g them years ago, meant anything different at that time, than
„resolution of physical screen handled by its Xserver”?
--
regards,
Zbigniew
that panning, or
anything else, is it Linux, or any of xBSD's etc.? In all these cases
t'll be still Xorg server, anyway.
That's all I need for today — and that's what DisplayWidth /
DisplayHeight promised to return
--
regards,
Zbigniew
height = DisplayHeight(display, screen_number);
int width = DisplayWidth(display, screen_number);
XCloseDisplay(display);
printf("Height: %d\n", height);
printf("Width: %d\n", width);
return 0;
}
What more you need to find out „which display”?
--
regards,
Zbigniew
> Which screen? What is your use case? What are you trying to achieve?
I already wrote that in my post — that was my reply to yours — from
31. August, I quote:
„Could you, please, suggest a „replacement functions” for these two
[macros we're talking about], that I could use to get the dimensions
ad in
mind? A physical device, or the one from „some case”?
--
regards,
Zbigniew
> If you are doing this for open source project, you should change your code
> to:
>
> [..]
The code you've pasted doesn't work properly; it returns the size of
virtual screen — so you added 3x as much lines to get, in effect, the
same (incorrect) result as the few lines I pasted.
> Oh, and no I
> Oh, I see. I suggest you try writing some concrete code - learning this
in abstract can be tricky.
> Don't be afraid to rewrite it from scratch a few times. There is existing
source code from X examples
> and tools, as well as other libraries, such as gtk and Qt.
Dear Volodya,
dpn't you worry a
11 matches
Mail list logo