Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for transient window going off the screen

  • Loading branch information...
commit 48646382dbea2c1ad5a5cee8dcd14c169f67aa57 1 parent 331d75e
@moetunes authored
Showing with 12 additions and 6 deletions.
  1. +3 −0  ChangeLog
  2. +1 −1  config.h.def
  3. +8 −5 dminiwm.c
View
3  ChangeLog
@@ -1,3 +1,6 @@
+7/4/12
+ Fix for transient window going off the screen
+
3/4/12
Fix for mode not sticking and window unmapping on first desktop change
View
2  config.h.def
@@ -32,7 +32,7 @@
#define MASTER_SIZE 0.52
#define TOP_PANEL 0 /* 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 SHOW_BAR 1 /* 1=Don't 0=Have the bar shown with a window open */
+#define SHOW_BAR 0 /* 1=Don't 0=Have the bar shown with a window open */
#define BORDER_WIDTH 2
#define ATTACH_ASIDE 1 /* 0=TRUE, 1=New window is master */
#define TOP_STACK 0 /* 0=TRUE, 1=New window added to bottom of stack when using ATTACH_ASIDE */
View
13 dminiwm.c
@@ -444,7 +444,6 @@ void client_to_desktop(const Arg arg) {
select_desktop(tmp2);
}
}
-
}
void save_desktop(int i) {
@@ -734,6 +733,8 @@ void maprequest(XEvent *e) {
XGetWindowAttributes(dis, ev->window, &attr);
if(attr.override_redirect) return;
+ int y=0;
+ if(TOP_PANEL == 0) y = panel_size;
// For fullscreen mplayer (and maybe some other program)
client *c;
@@ -747,6 +748,8 @@ void maprequest(XEvent *e) {
Window trans = None;
if (XGetTransientForHint(dis, ev->window, &trans) && trans != None) {
add_window(ev->window, 1); XMapWindow(dis, ev->window);
+ if((attr.y + attr.height) > sh)
+ XMoveResizeWindow(dis,ev->window,attr.x,y,attr.width,attr.height-10);
XSetWindowBorderWidth(dis,ev->window,BORDER_WIDTH);
XSetWindowBorder(dis,ev->window,win_focus);
update_current();
@@ -927,7 +930,7 @@ void logger(const char* e) {
}
void setup() {
- int i, j, k=0;
+ int i, j;
// Install a signal
sigchld(0);
@@ -979,10 +982,10 @@ void setup() {
XModifierKeymap *modmap;
numlockmask = 0;
modmap = XGetModifierMapping(dis);
- for (k = 0; k < 8; k++) {
+ for (i = 0; i < 8; i++) {
for (j = 0; j < modmap->max_keypermod; j++) {
- if(modmap->modifiermap[k * modmap->max_keypermod + j] == XKeysymToKeycode(dis, XK_Num_Lock))
- numlockmask = (1 << k);
+ if(modmap->modifiermap[i * modmap->max_keypermod + j] == XKeysymToKeycode(dis, XK_Num_Lock))
+ numlockmask = (1 << i);
}
}
XFreeModifiermap(modmap);
Please sign in to comment.
Something went wrong with that request. Please try again.