Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1445024 Details for
Bug 1583454
A display problem when calling XFillRectangle to draw something
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
A simple C code to reproduce this problem
rects.c (text/x-csrc), 3.01 KB, created by
Peter Sun
on 2018-05-29 03:21:28 UTC
(
hide
)
Description:
A simple C code to reproduce this problem
Filename:
MIME Type:
Creator:
Peter Sun
Created:
2018-05-29 03:21:28 UTC
Size:
3.01 KB
patch
obsolete
>#include <X11/Xlib.h> >#include <X11/Xutil.h> >#include <stdlib.h> >#include <stdio.h> > >static int WINW=719; >static int WINH=528; > >unsigned char dice[] = { >0x00, 0x00, 0xfe, 0x7f, 0x02, 0x40, 0x32, 0x40, >0x7a, 0x40, 0x7a, 0x40, 0x32, 0x40, 0x02, 0x40, >0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, >0x02, 0x40, 0x02, 0x40, 0xfe, 0x7f, 0x00, 0x00 >}; > >XRectangle rectangles[3][6] = >{ >{ > { -26749, 467, 52409, 46}, > { -26749, 375, 52409, 47}, > { -26749, 284, 52409, 46}, > { -26749, 192, 52409, 47}, > { -26749, 101, 52409, 46}, > { -26749, 9, 52409, 47} >}, >{ > { -26749, 467, 30000, 46}, > { -26749, 375, 30000, 47}, > { -26749, 284, 30000, 46}, > { -26749, 192, 30000, 47}, > { -26749, 101, 30000, 46}, > { -26749, 9, 30000, 47} >}, >{ > { -13000, 467, 15000, 46}, > { -13000, 375, 15000, 47}, > { -13000, 284, 15000, 46}, > { -13000, 192, 15000, 47}, > { -13000, 101, 15000, 46}, > { -13000, 9, 15000, 47} >} >}; > >int main(int argc, char **argv) >{ > Display *dpy; > Window win; > Pixmap stipple; > XSetWindowAttributes attr; > XEvent event; > int depth, screen; > Visual *visual; > GC gc; > int whichButton; > > XSizeHints hints; > XWMHints wmhints; > > dpy = XOpenDisplay(0); > screen = DefaultScreen(dpy); > depth = DefaultDepth(dpy, screen); > visual=DefaultVisual(dpy, screen); > > if (depth!=24 && depth!=16 && depth!=15) > { > printf("This program needs a true-color visual.\n"); > return 1; > } > > attr.background_pixel = 0; > attr.backing_store = Always; > win = XCreateWindow(dpy, DefaultRootWindow(dpy), > 0, 0, WINW, WINH, 0, depth, > InputOutput, visual, > CWBackPixel|CWBackingStore, &attr); > > hints.flags=PPosition; > hints.x=100; > hints.y=100; > XSetNormalHints(dpy, win, &hints); > > wmhints.flags=StateHint|InputHint; > wmhints.initial_state=NormalState; > wmhints.input=True; > XSetWMHints(dpy, win, &wmhints); > > XSelectInput(dpy, win, ButtonPressMask); > XMapRaised(dpy, win); > XSync(dpy, False); > > gc = XCreateGC(dpy, win, 0L, NULL); > XSetFillStyle(dpy, gc, FillStippled); > stipple=XCreateBitmapFromData(dpy, win, (char *)dice, 16, 16); > XSetStipple(dpy, gc, stipple); > XSetForeground(dpy, gc, 0x00228A6A); > > while (1) > { > XNextEvent(dpy, &event); > > if (event.type == ButtonPress) > { > XClearWindow(dpy, win); > XSetFillStyle(dpy, gc, FillStippled); > > switch (whichButton=event.xbutton.button) > { > case 1: > printf("rect case 1 = (-26749, 467, 52409, 46)\n"); > break; > > case 2: > printf("rect case 2 = (-26749, 467, 30000, 46)\n"); > break; > > case 3: > printf("rect case 3 = (-13000, 467, 15000, 46)\n"); > break; > > default: > printf("Wrong button !!\n"); > whichButton=1; > } > > XFillRectangles(dpy, win, gc, rectangles[whichButton-1], 6); > XSetFillStyle(dpy, gc, FillSolid); > XDrawRectangles(dpy, win, gc, rectangles[whichButton-1], 6); > XFlush(dpy); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1583454
: 1445024