Skip to content

Commit

Permalink
git-svn-id: file:///media/LinuxData/Development/SVN/XDecorations@192 …
Browse files Browse the repository at this point in the history
…a077cb93-66c8-45fd-b335-998722470d8a
  • Loading branch information
keithhedger committed Dec 21, 2014
1 parent d039a19 commit 352d095
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changlog
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
0.1.7
This is the last release that will write to the root window as most distros seem to block this one way or another.
Added y offsets for snow etc settling on windows.
Added y offsets for snow etc settling on bottom.
Added packaging script thanks to Mario for that.
Added different max settling height to windows.
Changed some option names.
Expand Down
2 changes: 2 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ If no command line otions are used and no config file exists at ~/.config/xdecor
CAVEATS:
You MUST have a composite manager running to use the windowing option ( default ), semi transparent images can ONLY be used when in window mode, when writing to the root window ( -no-usewindow ) the alpha blend of the images will be ignored.

Snow etc settling on windows and at the bottom of the screen is only available if you are writing to a window ( -usewindow ) and NOT if you are writing to the root window ( -no-usewindow ), this is the last version - 0.1.7 that will support writing to the root window.

Bugs suggestions etc to:

[email protected]
Expand Down
3 changes: 3 additions & 0 deletions draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ void drawWindowSnow(void)

void drawSettled(void)
{
if(maxBottomHeight==0)
return;

XSetClipMask(display,gc,bottomSnow.mask);
XSetClipOrigin(display,gc,0,displayHeight-bottomSnow.maxHeight-bottomYOffset);
XCopyArea(display,bottomSnow.pixmap,drawOnThis,gc,0,0,displayWidth,bottomSnow.maxHeight,0,displayHeight-bottomSnow.maxHeight-bottomYOffset);
Expand Down
2 changes: 2 additions & 0 deletions globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ bool figureNeedsUpdate=false;
bool fallingNeedsUpdate=false;
bool lampsNeedsUpdate=false;

bool usingRootWindow=false;

//settled
settled windowSnow[MAXWINDOWS];
settled bottomSnow;
Expand Down
2 changes: 2 additions & 0 deletions globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ extern bool figureNeedsUpdate;
extern bool fallingNeedsUpdate;
extern bool lampsNeedsUpdate;

extern bool usingRootWindow;

//settled
extern settled windowSnow[MAXWINDOWS];
extern settled bottomSnow;
Expand Down
7 changes: 7 additions & 0 deletions startstop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

void initBottomSnow(void)
{

if(maxBottomHeight==0)
return;

bottomSnow.pixmap=XCreatePixmap(display,drawOnThis,displayWidth,maxBottomHeight+1,depth);
bottomSnow.mask=XCreatePixmap(display,drawOnThis,displayWidth,maxBottomHeight+1,1);
bottomSnow.maskgc=XCreateGC(display,bottomSnow.mask,0,NULL);
Expand All @@ -26,6 +30,9 @@ void initBottomSnow(void)

void initWindowSnow(void)
{
if(maxWindowHeight==0)
return;

for(int j=0;j<MAXWINDOWS;j++)
{
windowSnow[j].pixmap=0;
Expand Down
3 changes: 3 additions & 0 deletions update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

void clearBottomSnow(void)
{
if(maxBottomHeight==0)
return;

for(int j=0; j<displayWidth; j++)
bottomSnow.lasty[j]=maxBottomHeight;

Expand Down
13 changes: 11 additions & 2 deletions xdecorations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ int main(int argc,char* argv[])
visual=DefaultVisual(display,screen);
useBuffer=false;
drawOnThis=rootWin;
usingRootWindow=true;
}
else
{
Expand Down Expand Up @@ -752,7 +753,8 @@ int main(int argc,char* argv[])
printf("Can't get ARGB, do you have a composite manager running\n");
drawOnThis=rootWin;
useBuffer=false;
}
usingRootWindow=true;
}
}

gc=XCreateGC(display,drawOnThis,0,NULL);
Expand All @@ -762,6 +764,12 @@ int main(int argc,char* argv[])
blackColor=BlackPixel(display,screen);
whiteColor=WhitePixel(display,screen);

if(usingRootWindow==true)
{
maxBottomHeight=0;
maxWindowHeight=0;
}

initBottomSnow();
initWindowSnow();
initLamps();
Expand Down Expand Up @@ -845,7 +853,8 @@ int main(int argc,char* argv[])
if(watchConfig==true)
reloadConfig();

getOpenwindows();
if(usingRootWindow==false)
getOpenwindows();
}

if(useWindow==false)
Expand Down

0 comments on commit 352d095

Please sign in to comment.