Avoid ETranslateCoordinates in window mode.
SVN revision: 46525
This commit is contained in:
parent
6156de7fce
commit
c45f034ced
2
src/E.h
2
src/E.h
|
@ -406,7 +406,7 @@ typedef struct {
|
|||
char exit_now;
|
||||
char save_ok;
|
||||
char coredump;
|
||||
int win_w, win_h;
|
||||
int win_x, win_y, win_w, win_h;
|
||||
int exit_mode;
|
||||
char *exit_param;
|
||||
int child_count;
|
||||
|
|
|
@ -1970,8 +1970,14 @@ DeskHandleEvents(Win win __UNUSED__, XEvent * ev, void *prm)
|
|||
break;
|
||||
|
||||
case ConfigureNotify:
|
||||
if (ev->xconfigure.window == WinGetXwin(VROOT))
|
||||
DeskRootResize(0, ev->xconfigure.width, ev->xconfigure.height);
|
||||
if (ev->xconfigure.window != WinGetXwin(VROOT))
|
||||
break;
|
||||
if (Mode.wm.window) /* This test should not be necessary but... */
|
||||
{
|
||||
Mode.wm.win_x = ev->xconfigure.x;
|
||||
Mode.wm.win_y = ev->xconfigure.y;
|
||||
}
|
||||
DeskRootResize(0, ev->xconfigure.width, ev->xconfigure.height);
|
||||
break;
|
||||
|
||||
case PropertyNotify:
|
||||
|
|
13
src/events.c
13
src/events.c
|
@ -381,16 +381,9 @@ EventsUpdateXY(int *px, int *py)
|
|||
static void
|
||||
ModeGetXY(int rx, int ry)
|
||||
{
|
||||
if (Mode.wm.window)
|
||||
{
|
||||
ETranslateCoordinates(RROOT, VROOT, rx, ry,
|
||||
&Mode.events.cx, &Mode.events.cy, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
Mode.events.cx = rx;
|
||||
Mode.events.cy = ry;
|
||||
}
|
||||
/* Mode.wm.win_x/y should always be 0 if not in window mode */
|
||||
Mode.events.cx = rx - Mode.wm.win_x;
|
||||
Mode.events.cy = ry - Mode.wm.win_y;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -274,7 +274,6 @@ void
|
|||
ICCCM_Configure(EWin * ewin)
|
||||
{
|
||||
XEvent ev;
|
||||
Window child;
|
||||
|
||||
if (EwinIsInternal(ewin))
|
||||
return;
|
||||
|
@ -294,9 +293,10 @@ ICCCM_Configure(EWin * ewin)
|
|||
ev.xconfigure.y = ewin->client.y;
|
||||
#endif
|
||||
if (Mode.wm.window)
|
||||
ETranslateCoordinates(VROOT, RROOT,
|
||||
ev.xconfigure.x, ev.xconfigure.y,
|
||||
&ev.xconfigure.x, &ev.xconfigure.y, &child);
|
||||
{
|
||||
ev.xconfigure.x += Mode.wm.win_x;
|
||||
ev.xconfigure.y += Mode.wm.win_y;
|
||||
}
|
||||
ev.xconfigure.width = ewin->client.w;
|
||||
ev.xconfigure.height = ewin->client.h;
|
||||
ev.xconfigure.border_width = 0;
|
||||
|
|
Loading…
Reference in New Issue