Summary: | Corner resizing cursors swapped when loading theme without size_fdiag and size_bdiag | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Magnus Holmgren <holmgren> |
Component: | kcm_mouse | Assignee: | Marie Loise Nolden <nolden> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | fredrik, wbauer1 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | All | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Magnus Holmgren
2010-08-21 15:26:48 UTC
According to http://fedoraproject.org/wiki/Artwork/EchoCursors/NamingSpec the hashes are indeed swapped. Note however, that there might be a confusion about what is "backward" and not. For example, http://doc.trolltech.com/4.6/qcursor.html shows "BDiag" the same as the NE-SW diagonal. Another reference I found is http://ubuntuforums.org/showthread.php?t=1440110 where it says "c7088f0f3e6c8088236ef8e1e3e70000 --> top_left_corner". On the cursor theme I am using (flatcursor from kde-look.org), there is a link "c7088f0f3e6c8088236ef8e1e3e70000 -> bd_double_arrow". Confused. See also bug 54359, which states the bug is in the theme. Adding Fredrik to ask for reference and clafification. (In reply to comment #2) > Note however, that there might be a confusion about what is "backward" and not. > For example, http://doc.trolltech.com/4.6/qcursor.html shows "BDiag" the same > as the NE-SW diagonal. BDiag is definitely NE-SW, and FDiag is SE-NW, but at the same time everyone seems to be of the opinion that bd_double_arrow is SE-NW and that fd_double_arrow is NE-SW. I have now located the bitmaps in QCursor and the hash algorithm in libXcursor (http://cgit.freedesktop.org/xorg/lib/libXcursor/tree/src/xlib.c) and verified that, indeed, size_fdiag hashes to c7088f0f3e6c8088236ef8e1e3e70000 and size_bdiag to fcf1c3c7cd4491d801f1e1c78f100000. The mapping in xcursortheme.cpp is therefore wrong. Put together and constant values substituted: #include <stdio.h> typedef unsigned char uchar; static const uchar cur_bdiag_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x3e, 0x00, 0x37, 0x88, 0x23, 0xd8, 0x01, 0xf8, 0x00, 0x78, 0x00, 0xf8, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static const uchar cur_fdiag_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0xf8, 0x00, 0x78, 0x00, 0xf8, 0x00, 0xd8, 0x01, 0x88, 0x23, 0x00, 0x37, 0x00, 0x3e, 0x00, 0x3c, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00 }; #define RotByte(t,i) (((t) << (i)) | ((t) >> (8 - (i)))) void print_hash(const uchar *data) { int i = 0; uchar t; uchar hash[16] = ""; for (int y = 0; y < 16; y++) { for (int x = 0; x < 16 / 8; x++) { t = data[2*y+x]; if (t) hash[(i++) & 0xf] ^= RotByte (t, y & 7); } } for (i = 0; i < 16; i++) { printf("%02x", hash[i]); } } int main () { printf("size_fdiag hash: "); print_hash(cur_fdiag_bits); printf("\n"); printf("size_bdiag hash: "); print_hash(cur_bdiag_bits); printf("\n"); } The same as bug#325837, which contains a review request to fix this *** This bug has been marked as a duplicate of bug 325837 *** |