1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-07 00:35:53 +01:00

bug fixes

This commit is contained in:
kojima
1999-04-27 01:38:09 +00:00
parent d3609d3449
commit a205d1f5c2
21 changed files with 2781 additions and 1906 deletions

View File

@@ -780,6 +780,7 @@ void
wKWMCheckClientInitialState(WWindow *wwin)
{
long val;
WArea area;
if (getSimpleHint(wwin->client_win, _XA_KWM_WIN_STICKY, &val) && val) {
@@ -793,6 +794,17 @@ wKWMCheckClientInitialState(WWindow *wwin)
wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
}
if (getAreaHint(wwin->client_win, _XA_KWM_WIN_GEOMETRY_RESTORE, &area)
&& (wwin->old_geometry.x != area.x1
|| wwin->old_geometry.y != area.y1
|| wwin->old_geometry.width != area.x2 - area.x1
|| wwin->old_geometry.height != area.y2 - area.y1)) {
wwin->old_geometry.x = area.x1;
wwin->old_geometry.y = area.y1;
wwin->old_geometry.width = area.x2 - area.x1;
wwin->old_geometry.height = area.y2 - area.y1;
}
}

View File

@@ -120,7 +120,7 @@ showPosition(WWindow *wwin, int x, int y)
int fw, fh;
if (wPreferences.move_display == WDIS_NEW) {
#if 0
#if 1
int width = wwin->frame->core->width;
int height = wwin->frame->core->height;
@@ -160,7 +160,7 @@ static void
cyclePositionDisplay(WWindow *wwin, int x, int y, int w, int h)
{
WScreen *scr = wwin->screen_ptr;
wPreferences.move_display++;
wPreferences.move_display %= NUM_DISPLAYS;
@@ -176,7 +176,6 @@ cyclePositionDisplay(WWindow *wwin, int x, int y, int w, int h)
moveGeometryDisplayCentered(scr, x + w/2, y + h/2);
}
XMapRaised(dpy, scr->geometry_display);
showPosition(wwin, x, y);
}
}
@@ -1071,6 +1070,11 @@ updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance,
newY = data->calcY;
if (data->realX != newX || data->realY != newY) {
if (wPreferences.move_display == WDIS_NEW
&& !scr->selected_windows) {
showPosition(wwin, data->realX, data->realY);
}
if (opaqueMove) {
doWindowMove(wwin, scr->selected_windows,
newX - wwin->frame_x,
@@ -1097,12 +1101,6 @@ updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance,
}
if (!scr->selected_windows) {
if (wPreferences.move_display == WDIS_NEW) {
showPosition(wwin, data->realX, data->realY);
}
showPosition(wwin, newX, newY);
}
}
@@ -1450,6 +1448,14 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
rimg = InitGhostWindowMove(scr);
#endif
if (wPreferences.opaque_move && !wPreferences.use_saveunders) {
XSetWindowAttributes attr;
attr.save_under = True;
XChangeWindowAttributes(dpy, wwin->frame->core->window,
CWSaveUnder, &attr);
}
initMoveData(wwin, &moveData);
moveData.mouseX = ev->xmotion.x_root;
@@ -1495,9 +1501,20 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
moveData.realY - wwin->frame_y);
}
cyclePositionDisplay(wwin, moveData.realX, moveData.realY,
if (wPreferences.move_display == WDIS_NEW
&& !scr->selected_windows) {
showPosition(wwin, moveData.realX, moveData.realY);
XUngrabServer(dpy);
}
cyclePositionDisplay(wwin, moveData.realX, moveData.realY,
moveData.winWidth, moveData.winHeight);
if (wPreferences.move_display == WDIS_NEW
&& !scr->selected_windows) {
XGrabServer(dpy);
showPosition(wwin, moveData.realX, moveData.realY);
}
if (!opaqueMove) {
drawFrames(wwin, scr->selected_windows,
moveData.realX - wwin->frame_x,
@@ -1518,6 +1535,11 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
if (!warped && !wPreferences.no_autowrap) {
int oldWorkspace = scr->current_workspace;
if (wPreferences.move_display == WDIS_NEW
&& !scr->selected_windows) {
showPosition(wwin, moveData.realX, moveData.realY);
XUngrabServer(dpy);
}
if (!opaqueMove) {
drawFrames(wwin, scr->selected_windows,
moveData.realX - wwin->frame_x,
@@ -1530,12 +1552,17 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
updateMoveData(wwin, &moveData);
warped = 1;
}
if (!opaqueMove) {
drawFrames(wwin, scr->selected_windows,
drawFrames(wwin, scr->selected_windows,
moveData.realX - wwin->frame_x,
moveData.realY - wwin->frame_y);
}
if (wPreferences.move_display == WDIS_NEW
&& !scr->selected_windows) {
XSync(dpy, False);
showPosition(wwin, moveData.realX, moveData.realY);
XGrabServer(dpy);
}
} else {
warped = 0;
}
@@ -1556,8 +1583,12 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
if (started && !opaqueMove)
drawFrames(wwin, scr->selected_windows, 0, 0);
if (!opaqueMove)
if (!opaqueMove || (wPreferences.move_display==WDIS_NEW
&& !scr->selected_windows)) {
XGrabServer(dpy);
if (wPreferences.move_display==WDIS_NEW)
showPosition(wwin, moveData.realX, moveData.realY);
}
}
break;
@@ -1621,6 +1652,14 @@ wMouseMoveWindow(WWindow *wwin, XEvent *ev)
}
}
if (wPreferences.opaque_move && !wPreferences.use_saveunders) {
XSetWindowAttributes attr;
attr.save_under = False;
XChangeWindowAttributes(dpy, wwin->frame->core->window,
CWSaveUnder, &attr);
}
freeMoveData(&moveData);
return 0;

View File

@@ -1722,8 +1722,7 @@ OpenRootMenu(WScreen *scr, int x, int y, int keyboard)
if (keyboard)
wMenuMapAt(menu, 0, 0, True);
else
wMenuMapCopyAt(menu, x-menu->frame->core->width/2,
y-menu->frame->top_width/2);
wMenuMapCopyAt(menu, x-menu->frame->core->width/2, y);
}
return;
}
@@ -1769,8 +1768,7 @@ OpenRootMenu(WScreen *scr, int x, int y, int keyboard)
scr->root_menu = menu;
}
if (menu) {
wMenuMapAt(menu, x-menu->frame->core->width/2, y-menu->frame->top_width/2,
keyboard);
wMenuMapAt(menu, x-menu->frame->core->width/2, y, keyboard);
}
if (scr->flags.root_menu_changed_shortcuts)

View File

@@ -102,12 +102,12 @@ OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard)
if (keyboard)
wMenuMapAt(switchmenu, 0, 0, True);
else
wMenuMapCopyAt(switchmenu, x-switchmenu->frame->core->width/2,
y-switchmenu->frame->top_width/2);
wMenuMapCopyAt(switchmenu,
x-switchmenu->frame->core->width/2, y);
}
} else {
wMenuMapAt(switchmenu, x-switchmenu->frame->core->width/2,
y-switchmenu->frame->top_width/2, keyboard);
wMenuMapAt(switchmenu, x-switchmenu->frame->core->width/2, y,
keyboard);
}
return;
}
@@ -125,8 +125,8 @@ OpenSwitchMenu(WScreen *scr, int x, int y, int keyboard)
if (switchmenu) {
if (!switchmenu->flags.realized)
wMenuRealize(switchmenu);
wMenuMapAt(switchmenu, x-switchmenu->frame->core->width/2,
y-switchmenu->frame->top_width/2, keyboard);
wMenuMapAt(switchmenu, x-switchmenu->frame->core->width/2, y,
keyboard);
}
}

View File

@@ -363,7 +363,7 @@
#define MENU_SELECT_DELAY 200
/* delay for jumpback of scrolled menus */
#define MENU_JUMP_BACK_DELAY 200
#define MENU_JUMP_BACK_DELAY 300
/* *** animation speed constants *** */