public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* XWin cursor huge on one computer but normal on another
@ 2014-08-03 14:32 Matt D.
  2014-08-04 15:30 ` Jon TURNEY
  0 siblings, 1 reply; 2+ messages in thread
From: Matt D. @ 2014-08-03 14:32 UTC (permalink / raw)
  To: cygwin-xfree

I primarily work on my workstation which has four 1080p monitors (three 
on the bottom with the fourth at center top) and for the longest time I 
thought that it this was a configuration error on my part; and perhaps 
it still it.

The issue is that on my worksation, the cursor is huge and is sometimes 
even cropped for being too large. This is especially noticeable for 
applications like xterm and gedit.

I think it might be a DPI or scaling issue due to my large screen size, 
however I've always explicitly defined "-dpi 96" in my xinit.

I had thought that this was a known bug and hadn't thought much about it 
until I pulled up gedit on my laptop where I saw that the cursors were 
all fine. I thought that maybe I had different packages but even after 
copying my entire cygwin directory and startup scripts over, on my 
laptop it still shows cursors no larger than the default Windows size.

Has anyone experienced this before?


Thanks,

Matt D.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: XWin cursor huge on one computer but normal on another
  2014-08-03 14:32 XWin cursor huge on one computer but normal on another Matt D.
@ 2014-08-04 15:30 ` Jon TURNEY
  0 siblings, 0 replies; 2+ messages in thread
From: Jon TURNEY @ 2014-08-04 15:30 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: matt

On 03/08/2014 15:32, Matt D. wrote:
> I primarily work on my workstation which has four 1080p monitors (three
> on the bottom with the fourth at center top) and for the longest time I
> thought that it this was a configuration error on my part; and perhaps
> it still it.
>
> The issue is that on my worksation, the cursor is huge and is sometimes
> even cropped for being too large. This is especially noticeable for
> applications like xterm and gedit.
>
> I think it might be a DPI or scaling issue due to my large screen size,
> however I've always explicitly defined "-dpi 96" in my xinit.
>
> I had thought that this was a known bug and hadn't thought much about it
> until I pulled up gedit on my laptop where I saw that the cursors were
> all fine. I thought that maybe I had different packages but even after
> copying my entire cygwin directory and startup scripts over, on my
> laptop it still shows cursors no larger than the default Windows size.
>
> Has anyone experienced this before?
This is pretty odd.  Not a known bug, or one that I think we have a had 
reported before.

I guess what you are seeing when you say the cursor is 'cropped' is the 
X cursor being truncated to fit in the Windows cursor size of 
GetSystemMetrics(SM_CXCURSOR) by GetSystemMetrics(SM_CYCURSOR)

The libXcursor checks various things [1] when choosing a cursor size, 
falling back to (smallest screen dimension/48), so I guess it's your 
large display causing this issue.

I'm not sure about the best way to fix this, but as a workaround for the 
moment, you might try setting the XCURSOR_SIZE env var to something 
reasonable.

You might like to try this small test program to confirm what's going on:

$ cat cursor.c
#include <X11/Xwindows.h>
#include <X11/Xcursor/Xcursor.h>

int main()
{
    Display *dpy = XOpenDisplay(NULL);
    int c = XcursorGetDefaultSize(dpy);
    printf("XcursorGetDefaultSize = %d\n", c);
    printf("GetSystemMetrics(SM_CXCURSOR) = %d\n", 
GetSystemMetrics(SM_CXCURSOR));
    printf("GetSystemMetrics(SM_CYCURSOR) = %d\n", 
GetSystemMetrics(SM_CYCURSOR));
}

$ gcc cursor.c  -o cursor -lXcursor -lX11

$ ./cursor
XcursorGetDefaultSize = 22
GetSystemMetrics(SM_CXCURSOR) = 32
GetSystemMetrics(SM_CYCURSOR) = 32

[1] http://cgit.freedesktop.org/xorg/lib/libXcursor/tree/src/display.c#n168


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-04 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-03 14:32 XWin cursor huge on one computer but normal on another Matt D.
2014-08-04 15:30 ` Jon TURNEY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).