mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
New move_window function
This commit is contained in:
committed by
Carlos R. Mafra
parent
7facc79c0c
commit
42cb1291e3
@@ -1767,9 +1767,8 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll)
|
|||||||
|
|
||||||
if (aicon->x_pos != X || aicon->y_pos != Y) {
|
if (aicon->x_pos != X || aicon->y_pos != Y) {
|
||||||
#ifdef ANIMATIONS
|
#ifdef ANIMATIONS
|
||||||
if (!wPreferences.no_animations) {
|
if (!wPreferences.no_animations)
|
||||||
SlideWindow(aicon->icon->core->window, aicon->x_pos, aicon->y_pos, X, Y);
|
SlideWindow(aicon->icon->core->window, aicon->x_pos, aicon->y_pos, X, Y);
|
||||||
}
|
|
||||||
#endif /* ANIMATIONS */
|
#endif /* ANIMATIONS */
|
||||||
}
|
}
|
||||||
wAppIconMove(aicon, X, Y);
|
wAppIconMove(aicon, X, Y);
|
||||||
@@ -1796,18 +1795,9 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll)
|
|||||||
head = wGetHeadForWindow(wwin);
|
head = wGetHeadForWindow(wwin);
|
||||||
|
|
||||||
if (arrangeAll || !wwin->flags.icon_moved) {
|
if (arrangeAll || !wwin->flags.icon_moved) {
|
||||||
if (wwin->icon_x != X || wwin->icon_y != Y) {
|
if (wwin->icon_x != X || wwin->icon_y != Y)
|
||||||
#ifdef ANIMATIONS
|
move_window(wwin->icon->core->window, wwin->icon_x, wwin->icon_y, X, Y);
|
||||||
if (wPreferences.no_animations) {
|
|
||||||
XMoveWindow(dpy, wwin->icon->core->window, X, Y);
|
|
||||||
} else {
|
|
||||||
SlideWindow(wwin->icon->core->window, wwin->icon_x,
|
|
||||||
wwin->icon_y, X, Y);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
XMoveWindow(dpy, wwin->icon->core->window, X, Y);
|
|
||||||
#endif /* ANIMATIONS */
|
|
||||||
}
|
|
||||||
wwin->icon_x = X;
|
wwin->icon_x = X;
|
||||||
wwin->icon_y = Y;
|
wwin->icon_y = Y;
|
||||||
|
|
||||||
|
|||||||
15
src/dock.c
15
src/dock.c
@@ -592,18 +592,9 @@ static void colectIconsCallback(WMenu *menu, WMenuEntry *entry)
|
|||||||
if (!aicon->docked && wDockFindFreeSlot(clip, &x, &y)) {
|
if (!aicon->docked && wDockFindFreeSlot(clip, &x, &y)) {
|
||||||
x_pos = clip->x_pos + x * ICON_SIZE;
|
x_pos = clip->x_pos + x * ICON_SIZE;
|
||||||
y_pos = clip->y_pos + y * ICON_SIZE;
|
y_pos = clip->y_pos + y * ICON_SIZE;
|
||||||
if (aicon->x_pos != x_pos || aicon->y_pos != y_pos) {
|
if (aicon->x_pos != x_pos || aicon->y_pos != y_pos)
|
||||||
#ifdef ANIMATIONS
|
move_window(aicon->icon->core->window, aicon->x_pos, aicon->y_pos, x_pos, y_pos);
|
||||||
if (wPreferences.no_animations) {
|
|
||||||
XMoveWindow(dpy, aicon->icon->core->window, x_pos, y_pos);
|
|
||||||
} else {
|
|
||||||
SlideWindow(aicon->icon->core->window,
|
|
||||||
aicon->x_pos, aicon->y_pos, x_pos, y_pos);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
XMoveWindow(dpy, aicon->icon->core->window, x_pos, y_pos);
|
|
||||||
#endif /* ANIMATIONS */
|
|
||||||
}
|
|
||||||
aicon->attracted = 1;
|
aicon->attracted = 1;
|
||||||
if (!aicon->icon->shadowed) {
|
if (!aicon->icon->shadowed) {
|
||||||
aicon->icon->shadowed = 1;
|
aicon->icon->shadowed = 1;
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ Bool UpdateDomainFile(WDDomain *domain);
|
|||||||
WWindow * NextToFocusAfter(WWindow *wwin);
|
WWindow * NextToFocusAfter(WWindow *wwin);
|
||||||
WWindow * NextToFocusBefore(WWindow *wwin);
|
WWindow * NextToFocusBefore(WWindow *wwin);
|
||||||
|
|
||||||
|
void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
|
||||||
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
|
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
|
||||||
|
|
||||||
RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
|
RImage * wGetImageForWindowName(WScreen *scr, char *winstance, char *wclass);
|
||||||
|
|||||||
12
src/misc.c
12
src/misc.c
@@ -247,6 +247,18 @@ static void eatExpose(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void move_window(Window win, int from_x, int from_y, int to_x, int to_y)
|
||||||
|
{
|
||||||
|
#ifdef ANIMATIONS
|
||||||
|
if (wPreferences.no_animations)
|
||||||
|
XMoveWindow(dpy, win, to_x, to_y);
|
||||||
|
else
|
||||||
|
SlideWindow(win, from_x, from_y, to_x, to_y);
|
||||||
|
#else
|
||||||
|
XMoveWindow(dpy, win, to_x, to_y);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y)
|
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y)
|
||||||
{
|
{
|
||||||
time_t time0 = time(NULL);
|
time_t time0 = time(NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user