mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
- Fixed Clip's workspace menu mapping to be consistent with the others
- Fixed bug in wmsetbg that caused scale and maxscale to both do maxscale (Alexey Voinov <voins@voins.program.ru>)
This commit is contained in:
@@ -62,6 +62,9 @@ Changes since version 0.80.2:
|
|||||||
- Autoarrange icons after unhiding an application that has miniaturized
|
- Autoarrange icons after unhiding an application that has miniaturized
|
||||||
windows, else they may cover other icons which are now in the positions
|
windows, else they may cover other icons which are now in the positions
|
||||||
they have occupied before hiding
|
they have occupied before hiding
|
||||||
|
- Fixed Clip's workspace menu mapping to be consistent with the others
|
||||||
|
- Fixed bug in wmsetbg that caused scale and maxscale to both do maxscale
|
||||||
|
(Alexey Voinov <voins@voins.program.ru>)
|
||||||
|
|
||||||
|
|
||||||
Changes since version 0.80.1:
|
Changes since version 0.80.1:
|
||||||
|
|||||||
1
TODO
1
TODO
@@ -14,7 +14,6 @@ Do ASAP:
|
|||||||
|
|
||||||
Need to do:
|
Need to do:
|
||||||
===========
|
===========
|
||||||
- fix scaling/maxscaling code. it seem to always maxscale
|
|
||||||
- impelment a generic pixmap type, which receives attributes
|
- impelment a generic pixmap type, which receives attributes
|
||||||
(scaled/maxscaled/centered/tiled, smoothed, size/position, ...)
|
(scaled/maxscaled/centered/tiled, smoothed, size/position, ...)
|
||||||
- allow user to select/restore default root menu from wprefs
|
- allow user to select/restore default root menu from wprefs
|
||||||
|
|||||||
47
src/dock.c
47
src/dock.c
@@ -2641,9 +2641,10 @@ wDockSnapIcon(WDock *dock, WAppIcon *icon, int req_x, int req_y,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int onScreen(WScreen *scr, int x, int y, int sx, int ex, int sy, int ey)
|
static int
|
||||||
|
onScreen(WScreen *scr, int x, int y, int sx, int ex, int sy, int ey)
|
||||||
{
|
{
|
||||||
WMRect rect = { (x), (y), (ICON_SIZE), (ICON_SIZE) };
|
WMRect rect = {x, y, ICON_SIZE, ICON_SIZE};
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
wGetRectPlacementInfo(scr, rect, &flags);
|
wGetRectPlacementInfo(scr, rect, &flags);
|
||||||
@@ -2651,8 +2652,6 @@ static int onScreen(WScreen *scr, int x, int y, int sx, int ex, int sy, int ey)
|
|||||||
return !(flags & (XFLAG_DEAD | XFLAG_PARTIAL));
|
return !(flags & (XFLAG_DEAD | XFLAG_PARTIAL));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ON_SCREEN(x, y, sx, ex, sy, ey) onScreen(scr, x, y, sx, ex, sy, ey)
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* returns true if it can find a free slot in the dock,
|
* returns true if it can find a free slot in the dock,
|
||||||
@@ -2886,7 +2885,7 @@ wDockFindFreeSlot(WDock *dock, int *x_pos, int *y_pos)
|
|||||||
y = -i;
|
y = -i;
|
||||||
ty = dock->y_pos + y*ICON_SIZE;
|
ty = dock->y_pos + y*ICON_SIZE;
|
||||||
if (slot_map[XY2OFS(x,y)]==0
|
if (slot_map[XY2OFS(x,y)]==0
|
||||||
&& ON_SCREEN(tx, ty, sx, ex, sy, ey)) {
|
&& onScreen(scr, tx, ty, sx, ex, sy, ey)) {
|
||||||
*x_pos = x;
|
*x_pos = x;
|
||||||
*y_pos = y;
|
*y_pos = y;
|
||||||
done = 1;
|
done = 1;
|
||||||
@@ -2895,7 +2894,7 @@ wDockFindFreeSlot(WDock *dock, int *x_pos, int *y_pos)
|
|||||||
y = i;
|
y = i;
|
||||||
ty = dock->y_pos + y*ICON_SIZE;
|
ty = dock->y_pos + y*ICON_SIZE;
|
||||||
if (slot_map[XY2OFS(x,y)]==0
|
if (slot_map[XY2OFS(x,y)]==0
|
||||||
&& ON_SCREEN(tx, ty, sx, ex, sy, ey)) {
|
&& onScreen(scr, tx, ty, sx, ex, sy, ey)) {
|
||||||
*x_pos = x;
|
*x_pos = x;
|
||||||
*y_pos = y;
|
*y_pos = y;
|
||||||
done = 1;
|
done = 1;
|
||||||
@@ -2908,7 +2907,7 @@ wDockFindFreeSlot(WDock *dock, int *x_pos, int *y_pos)
|
|||||||
x = -i;
|
x = -i;
|
||||||
tx = dock->x_pos + x*ICON_SIZE;
|
tx = dock->x_pos + x*ICON_SIZE;
|
||||||
if (slot_map[XY2OFS(x,y)]==0
|
if (slot_map[XY2OFS(x,y)]==0
|
||||||
&& ON_SCREEN(tx, ty, sx, ex, sy, ey)) {
|
&& onScreen(scr, tx, ty, sx, ex, sy, ey)) {
|
||||||
*x_pos = x;
|
*x_pos = x;
|
||||||
*y_pos = y;
|
*y_pos = y;
|
||||||
done = 1;
|
done = 1;
|
||||||
@@ -2917,7 +2916,7 @@ wDockFindFreeSlot(WDock *dock, int *x_pos, int *y_pos)
|
|||||||
x = i;
|
x = i;
|
||||||
tx = dock->x_pos + x*ICON_SIZE;
|
tx = dock->x_pos + x*ICON_SIZE;
|
||||||
if (slot_map[XY2OFS(x,y)]==0
|
if (slot_map[XY2OFS(x,y)]==0
|
||||||
&& ON_SCREEN(tx, ty, sx, ex, sy, ey)) {
|
&& onScreen(scr, tx, ty, sx, ex, sy, ey)) {
|
||||||
*x_pos = x;
|
*x_pos = x;
|
||||||
*y_pos = y;
|
*y_pos = y;
|
||||||
done = 1;
|
done = 1;
|
||||||
@@ -3573,17 +3572,6 @@ openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
openClipWorkspaceMenu(WScreen *scr, int x, int y)
|
|
||||||
{
|
|
||||||
if (!scr->clip_ws_menu) {
|
|
||||||
scr->clip_ws_menu = wWorkspaceMenuMake(scr, False);
|
|
||||||
}
|
|
||||||
wWorkspaceMenuUpdate(scr, scr->clip_ws_menu);
|
|
||||||
wMenuMapAt(scr->clip_ws_menu, x, y, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
static void
|
static void
|
||||||
iconDblClick(WObjDescriptor *desc, XEvent *event)
|
iconDblClick(WObjDescriptor *desc, XEvent *event)
|
||||||
@@ -4157,13 +4145,24 @@ iconMouseDown(WObjDescriptor *desc, XEvent *event)
|
|||||||
|
|
||||||
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
|
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
|
||||||
aicon==scr->clip_icon) {
|
aicon==scr->clip_icon) {
|
||||||
openClipWorkspaceMenu(scr, event->xbutton.x_root+2,
|
if (!scr->clip_ws_menu) {
|
||||||
event->xbutton.y_root+2);
|
scr->clip_ws_menu = wWorkspaceMenuMake(scr, False);
|
||||||
|
}
|
||||||
if (scr->clip_ws_menu) {
|
if (scr->clip_ws_menu) {
|
||||||
WMenu *menu;
|
WMenu *wsMenu = scr->clip_ws_menu;
|
||||||
menu = scr->clip_ws_menu;
|
int xpos;
|
||||||
desc = &menu->menu->descriptor;
|
|
||||||
|
|
||||||
|
wWorkspaceMenuUpdate(scr, wsMenu);
|
||||||
|
|
||||||
|
xpos = event->xbutton.x_root - wsMenu->frame->core->width/2 - 1;
|
||||||
|
if (xpos < 0) {
|
||||||
|
xpos = 0;
|
||||||
|
} else if (xpos + wsMenu->frame->core->width > scr->scr_width-2) {
|
||||||
|
xpos = scr->scr_width - wsMenu->frame->core->width - 4;
|
||||||
|
}
|
||||||
|
wMenuMapAt(wsMenu, xpos, event->xbutton.y_root+2, False);
|
||||||
|
|
||||||
|
desc = &wsMenu->menu->descriptor;
|
||||||
event->xany.send_event = True;
|
event->xany.send_event = True;
|
||||||
(*desc->handle_mousedown)(desc, event);
|
(*desc->handle_mousedown)(desc, event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ applyImage(RContext *rc, BackgroundTexture *texture, RImage *image, char type,
|
|||||||
switch (toupper(type)) {
|
switch (toupper(type)) {
|
||||||
case 'S':
|
case 'S':
|
||||||
case 'M':
|
case 'M':
|
||||||
if (type == 'S') {
|
if (toupper(type) == 'S') {
|
||||||
w = width;
|
w = width;
|
||||||
h = height;
|
h = height;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user