# This is a BitKeeper generated patch for the following project: # Project Name: Lightweight Window Manager # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.5 -> 1.6 # client.c 1.2 -> 1.3 # disp.c 1.3 -> 1.4 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/02/11 jcopenha@marco.(none) 1.6 # display current x,y pos when doing move/resize on windows # -------------------------------------------- # diff -Nru a/client.c b/client.c --- a/client.c Mon Feb 11 14:51:54 2002 +++ b/client.c Mon Feb 11 14:51:54 2002 @@ -282,17 +282,20 @@ void Client_SizeFeedback(void) { int x, y; - char buf[4*2 + 3 + 1]; + char buf[4*4 + 3 + 5 + 1]; /* Make the popup 10% wider than the widest string it needs to show. */ - sprintf(buf, "%i x %i", current_screen->display_width, - current_screen->display_height); + sprintf(buf, "%i x %i (%i x %i)", current_screen->display_width, + current_screen->display_height, current->size.x, current->size.y); popup_width = XTextWidth(popup_font, buf, strlen(buf)); popup_width += popup_width/10; /* Put the popup in the right place to report on the window's size. */ - getMousePosition(&x, &y); - XMoveResizeWindow(dpy, current_screen->popup, x + 8, y + 8, + y = current->size.height / 2; + x = current->size.width / 2; + x = x - (popup_width / 2); + + XMoveResizeWindow(dpy, current_screen->popup, x+current->size.x, y+current->size.y, popup_width, popup_font->ascent + popup_font->descent + 1); XMapRaised(dpy, current_screen->popup); @@ -305,8 +308,8 @@ void size_expose(void) { - int width, height; - char buf[4*2 + 3 + 1]; + int width, height,x,y; + char buf[4*4 + 3 + 1 + 5]; width = current->size.width - 2*border; height = current->size.height - 2*border; @@ -328,10 +331,18 @@ if (current->size.height_inc != 0) height /= current->size.height_inc; - sprintf(buf, "%i x %i", width, height); + sprintf(buf, "%i x %i (%i x %i)", width, height, current->size.x, current->size.y); + y = current->size.height / 2; + x = current->size.width / 2; + x = x - (popup_width / 2); + + XMoveResizeWindow(dpy, current_screen->popup, x+current->size.x, y+current->size.y, + popup_width, popup_font->ascent + popup_font->descent + 1); + XDrawString(dpy, current_screen->popup, current_screen->size_gc, (popup_width - XTextWidth(popup_font, buf, strlen(buf))) / 2, popup_font->ascent + 1, buf, strlen(buf)); + } static void diff -Nru a/disp.c b/disp.c --- a/disp.c Mon Feb 11 14:51:54 2002 +++ b/disp.c Mon Feb 11 14:51:54 2002 @@ -490,6 +490,10 @@ getMousePosition(&pointer_x, &pointer_y); + if(interacting_edge == ENone) { + Client_SizeFeedback(); + } + if (interacting_edge != ENone) { nx = ox = current->size.x; ny = oy = current->size.y;