diff options
| author | moetunes <moetunes111@gmail.com> | 2011-10-13 09:36:14 +1000 |
|---|---|---|
| committer | moetunes <moetunes111@gmail.com> | 2011-10-13 09:36:14 +1000 |
| commit | 084c8ee0e6855426d6ddee759e77d706ce34fcbf (patch) | |
| tree | 8f34c841cb33eade3026af65473aa61d7add5578 /src | |
| parent | a57cd9d63979f2e8fb7437115e77ff35a275285d (diff) | |
Popup windows now aren't managed
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rwxr-xr-x | src/config.h | 4 | ||||
| -rw-r--r--[-rwxr-xr-x] | src/dminiwm.c | 33 |
3 files changed, 25 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9135117..e789e55 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,6 @@ +13/10/11 + Popup windows now aren't managed/added to the stack + 10/10/11 Reapplied setting master_size relevant to default mode diff --git a/src/config.h b/src/config.h index eb2555e..41bbbca 100755 --- a/src/config.h +++ b/src/config.h @@ -1,4 +1,4 @@ - /* config.h for dminiwm.c [ 0.1.0 ] + /* config.h for dminiwm.c [ 0.1.1 ] * * Started from catwm 31/12/10 * Bad window error checking and numlock checking used from @@ -28,13 +28,13 @@ #define MOD1 Mod1Mask #define MOD4 Mod4Mask #define MASTER_SIZE 0.6 +#define TOP_PANEL 1 /* 1=Don't 0=Have the panel at the top instead of the bottom */ #define PANEL_HEIGHT 18 /* 0 for no space for a panel */ #define BORDER_WIDTH 2 #define ATTACH_ASIDE 1 /* 0=TRUE, 1=New window is master */ #define DEFAULT_MODE 0 /* 0=Vertical, 1=Fullscreen 2=Horizontal 3=grid*/ #define FOLLOW_MOUSE 0 /* 1=Don't 0=Focus the window the mouse just entered */ #define FOLLOW_WINDOW 0 /* 1=Don't 0=Follow the window when moved to a different desktop */ -#define TOP_PANEL 1 /* 1=Don't 0=Have the panel at the top instead of the bottom */ // Colors #define FOCUS "#664422" // dkorange diff --git a/src/dminiwm.c b/src/dminiwm.c index 7fdb9b2..913f120 100755..100644 --- a/src/dminiwm.c +++ b/src/dminiwm.c @@ -1,4 +1,4 @@ -/* dminiwm.c [ 0.1.0 ] +/* dminiwm.c [ 0.1.1 ] * * I started this from catwm 31/12/10 * Bad window error checking and numlock checking used from @@ -350,7 +350,6 @@ void change_desktop(const Arg arg) { tile(); update_current(); - } void next_desktop() { @@ -425,7 +424,6 @@ void tile() { if(TOP_PANEL == 0) y = PANEL_HEIGHT; - // If only one window if(head != NULL && head->next == NULL) { XMoveResizeWindow(dis,head->win,0,y,sw+2*BORDER_WIDTH,sh+2*BORDER_WIDTH); @@ -642,19 +640,18 @@ void configurerequest(XEvent *e) { // Paste from DWM, thx again \o/ XConfigureRequestEvent *ev = &e->xconfigurerequest; XWindowChanges wc; + wc.x = ev->x; wc.y = ev->y; - if(ev->width < sw) { + if(ev->width < sw-BORDER_WIDTH) wc.width = ev->width; - } - else { - wc.width = sw; - } - if(ev->height < sh) + else + wc.width = sw-BORDER_WIDTH; + if(ev->height < sh-BORDER_WIDTH) wc.height = ev->height; else - wc.height = sh; - wc.border_width = 0; // ev->border_width; + wc.height = sh-BORDER_WIDTH; + wc.border_width = ev->border_width; wc.sibling = ev->above; wc.stack_mode = ev->detail; XConfigureWindow(dis, ev->window, ev->value_mask, &wc); @@ -663,14 +660,24 @@ void configurerequest(XEvent *e) { void maprequest(XEvent *e) { XMapRequestEvent *ev = &e->xmaprequest; + Window dialog_window; + // For dialog windows + XGetTransientForHint(dis, ev->window, &dialog_window); + if(dialog_window != 0) { + XMapWindow(dis, ev->window); + XSetInputFocus(dis,ev->window,RevertToParent,CurrentTime); + XRaiseWindow(dis,ev->window); + return; + } + // For fullscreen mplayer (and maybe some other program) client *c; for(c=head;c;c=c->next) if(ev->window == c->win) { XMapWindow(dis,ev->window); - XMoveResizeWindow(dis,c->win,0,0,sw-BORDER_WIDTH,sh-BORDER_WIDTH); + XMoveResizeWindow(dis,c->win,-BORDER_WIDTH,-BORDER_WIDTH,sw+BORDER_WIDTH,sh+BORDER_WIDTH); return; } @@ -681,7 +688,7 @@ void maprequest(XEvent *e) { } void destroynotify(XEvent *e) { - int i=0; + int i = 0; int j = 0; int tmp = current_desktop; client *c; |
