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 306438 Details for
Bug 448032
Xorg X11 child borders are redrawn incorrectly when window is dragged away from edge of screen
[?]
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.
C Xlib program that draws a window with 2 bordered children that can be used to easily see the child border redraw problem.
xbordertest.c (text/x-csrc), 2.25 KB, created by
Joey Adams
on 2008-05-23 02:09:17 UTC
(
hide
)
Description:
C Xlib program that draws a window with 2 bordered children that can be used to easily see the child border redraw problem.
Filename:
MIME Type:
Creator:
Joey Adams
Created:
2008-05-23 02:09:17 UTC
Size:
2.25 KB
patch
obsolete
>//build with the following command: gcc -Os -Wall -W -lX11 main.c -o xbordertest > >#include <X11/Xlib.h> >#include <stdlib.h> >#include <stdio.h> >#include <assert.h> > >#define WIDTH 640 >#define HEIGHT 480 >#define WIN_COUNT 1 > >static unsigned long x_rgb(Display *dpy, int screen, unsigned short r, unsigned short g, unsigned short b) { > XColor color = { > red: r, > green: g, > blue: b, > flags:DoRed|DoGreen|DoBlue > }; > XAllocColor(dpy, DefaultColormap(dpy,screen), &color); > return color.pixel; >} > >int main(int argc, char *argv[]) { > Display *dpy = XOpenDisplay(NULL); > assert(dpy); > int screen = DefaultScreen(dpy); > int color[5] = {BlackPixel(dpy,screen), WhitePixel(dpy,screen), x_rgb(dpy,screen,65535,0,0), x_rgb(dpy,screen,0,65535,0), x_rgb(dpy,screen,0,0,65535)}; > #define black 0 > #define white 1 > #define red 2 > #define green 3 > #define blue 4 > Atom wm_protocols = XInternAtom(dpy, "WM_PROTOCOLS", 0); > Atom wm_delete_window = XInternAtom(dpy, "WM_DELETE_WINDOW", 0); > > Window win[WIN_COUNT]; > Window win2[WIN_COUNT]; > Window win3[WIN_COUNT]; > int windows_left = WIN_COUNT; > int i; > for (i=0; i<WIN_COUNT; i++) { > win[i] = XCreateSimpleWindow(dpy, RootWindow(dpy,screen), 0,0, WIDTH,HEIGHT, 0, color[black], color[white]); > win2[i] = XCreateSimpleWindow(dpy, win[i], 10,20,100,50, 2, color[black], color[red]); > win3[i] = XCreateSimpleWindow(dpy, win[i], 120,20,100,50, 2, color[black], color[blue]); > fprintf(stderr, "%lu (%lu, %lu)\n", win[i], win2[i], win3[i]); > XMapWindow(dpy, win2[i]); > XMapWindow(dpy, win3[i]); > XSetWMProtocols(dpy, win[i], &wm_delete_window, 1); > GC gc = XCreateGC(dpy, win[i], 0, NULL); //can be used with both windows > XSelectInput(dpy, win[i], ExposureMask | StructureNotifyMask); > XMapWindow(dpy, win[i]); > } > > for (;;) { > XEvent e; > XNextEvent(dpy, &e); > switch (e.type) { > case ClientMessage: { > XClientMessageEvent *ev = &e.xclient; > if (ev->message_type==wm_protocols && (Atom)ev->data.l[0]==wm_delete_window) { > for (i=0; i<WIN_COUNT; i++) > if (ev->window == win[i]) { > fprintf(stderr, "Closing window %d (%lu)\n", i, win[i]); > XDestroyWindow(dpy, win[i]); > if (--windows_left==0) { > XCloseDisplay(dpy); > return 0; > } > break; > } > > } > } > } > } > > #undef black > #undef white >} >
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 448032
: 306438