mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Use wallpaper sizes for creating drawable area
This commit is contained in:
@@ -40,7 +40,7 @@
|
|||||||
tmp |= (((int)b >> (-bshift)) & bmask);
|
tmp |= (((int)b >> (-bshift)) & bmask);
|
||||||
|
|
||||||
|
|
||||||
Pixmap create_xpixmap(Fl_Image* img, XImage*& xim, Pixmap pix) {
|
Pixmap create_xpixmap(Fl_Image* img, XImage*& xim, Pixmap pix, int wp_w, int wp_h) {
|
||||||
if(!img)
|
if(!img)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -258,12 +258,16 @@ Pixmap create_xpixmap(Fl_Image* img, XImage*& xim, Pixmap pix) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Creating another window as drawable is needed since fl_window (as drawable) can't be
|
* Creating another window as drawable is needed since fl_window (as drawable) can't be
|
||||||
* used here (valid only in draw()).
|
* used here (valid only in draw()). Drawable must be size as wallpaper area or clients who
|
||||||
|
* query _XA_XROOTPMAP_ID will get BadWindow when goes out of drawable area (but not out of
|
||||||
|
* wallpaper area).
|
||||||
|
*
|
||||||
|
* FIXME: drawable background should be the same color as wallpaper background
|
||||||
*/
|
*/
|
||||||
Window drawable = XCreateSimpleWindow(fl_display, RootWindow(fl_display, fl_screen), 0, 0, iw,
|
Window drawable = XCreateSimpleWindow(fl_display, RootWindow(fl_display, fl_screen), 0, 0, wp_w,
|
||||||
ih, 0, 0, BlackPixel(fl_display, fl_screen));
|
wp_h, 0, 0, BlackPixel(fl_display, fl_screen));
|
||||||
|
|
||||||
pix = XCreatePixmap(fl_display, drawable, iw, ih, fl_visual->depth);
|
pix = XCreatePixmap(fl_display, drawable, wp_w, wp_h, fl_visual->depth);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The same applies as above;
|
* The same applies as above;
|
||||||
@@ -406,7 +410,7 @@ void Wallpaper::set_rootpmap(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
XImage* rootpmap_image = 0;
|
XImage* rootpmap_image = 0;
|
||||||
rootpmap_pixmap = create_xpixmap(image(), rootpmap_image, rootpmap_pixmap);
|
rootpmap_pixmap = create_xpixmap(image(), rootpmap_image, rootpmap_pixmap, w(), h());
|
||||||
|
|
||||||
if(rootpmap_image) {
|
if(rootpmap_image) {
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user