mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 13:28:05 +01:00
A few miscelaneous fixes
This commit is contained in:
@@ -152,9 +152,10 @@ rearrange(WMBox *box)
|
|||||||
void
|
void
|
||||||
WMSetBoxBorderWidth(WMBox *box, unsigned width)
|
WMSetBoxBorderWidth(WMBox *box, unsigned width)
|
||||||
{
|
{
|
||||||
|
if (box->borderWidth != width) {
|
||||||
box->borderWidth = width;
|
box->borderWidth = width;
|
||||||
|
|
||||||
rearrange(box);
|
rearrange(box);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -227,8 +228,12 @@ WMRemoveBoxSubview(WMBox *bPtr, WMView *view)
|
|||||||
void
|
void
|
||||||
WMSetBoxHorizontal(WMBox *box, Bool flag)
|
WMSetBoxHorizontal(WMBox *box, Bool flag)
|
||||||
{
|
{
|
||||||
|
/* make sure flag is either 0 or 1 no matter what true value was passed */
|
||||||
|
flag = ((flag==0) ? 0 : 1);
|
||||||
|
if (box->horizontal != flag) {
|
||||||
box->horizontal = flag;
|
box->horizontal = flag;
|
||||||
rearrange(box);
|
rearrange(box);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ paintButton(Button *bPtr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
W_PaintTextAndImage(bPtr->view, False, WMColorGC(textColor),
|
W_PaintTextAndImage(bPtr->view, True, WMColorGC(textColor),
|
||||||
(bPtr->font!=NULL ? bPtr->font : scrPtr->normalFont),
|
(bPtr->font!=NULL ? bPtr->font : scrPtr->normalFont),
|
||||||
relief, caption, bPtr->flags.alignment, image,
|
relief, caption, bPtr->flags.alignment, image,
|
||||||
bPtr->flags.imagePosition, gc, offset);
|
bPtr->flags.imagePosition, gc, offset);
|
||||||
|
|||||||
@@ -1723,7 +1723,7 @@ createPanel(Panel *p)
|
|||||||
panel->hand = WMCreatePixmapFromXPMData(scr, hand_xpm);
|
panel->hand = WMCreatePixmapFromXPMData(scr, hand_xpm);
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/* preview box */
|
/* preview box */
|
||||||
panel->prevL = WMCreateLabel(panel->box);
|
panel->prevL = WMCreateLabel(panel->box);
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/*********** Icon Slide Speed **********/
|
/*********** Icon Slide Speed **********/
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ createPanel(Panel *p)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
for (i=0; i<7; i++) {
|
for (i=0; i<7; i++) {
|
||||||
panel->swi[i] = WMCreateSwitchButton(panel->box);
|
panel->swi[i] = WMCreateSwitchButton(panel->box);
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ createPanel(Panel *p)
|
|||||||
WMFont *font;
|
WMFont *font;
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/***************** Input Focus Mode *****************/
|
/***************** Input Focus Mode *****************/
|
||||||
panel->kfocF = WMCreateFrame(panel->box);
|
panel->kfocF = WMCreateFrame(panel->box);
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
panel->prevL = WMCreateLabel(panel->box);
|
panel->prevL = WMCreateLabel(panel->box);
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/***************** Positioning of Icons *****************/
|
/***************** Positioning of Icons *****************/
|
||||||
panel->posF = WMCreateFrame(panel->box);
|
panel->posF = WMCreateFrame(panel->box);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ createPanel(Panel *p)
|
|||||||
font = WMSystemFontOfSize(scr, 10);
|
font = WMSystemFontOfSize(scr, 10);
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/**************** Initial Key Repeat ***************/
|
/**************** Initial Key Repeat ***************/
|
||||||
panel->delaF = WMCreateFrame(panel->box);
|
panel->delaF = WMCreateFrame(panel->box);
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
boldFont = WMBoldSystemFontOfSize(scr, 12);
|
boldFont = WMBoldSystemFontOfSize(scr, 12);
|
||||||
|
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ createPanel(_Panel *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
panel->typeP = WMCreatePopUpButton(panel->box);
|
panel->typeP = WMCreatePopUpButton(panel->box);
|
||||||
WMResizeWidget(panel->typeP, 150, 20);
|
WMResizeWidget(panel->typeP, 150, 20);
|
||||||
@@ -628,7 +628,7 @@ createPanel(_Panel *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
width = FRAME_WIDTH - 20 - 150 - 10;
|
width = FRAME_WIDTH - 20 - 150 - 10 - 2;
|
||||||
|
|
||||||
panel->optionsF = WMCreateFrame(panel->box);
|
panel->optionsF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optionsF, width, FRAME_HEIGHT - 15);
|
WMResizeWidget(panel->optionsF, width, FRAME_HEIGHT - 15);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ createPanel(Panel *p)
|
|||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/***************** Menu Scroll Speed ****************/
|
/***************** Menu Scroll Speed ****************/
|
||||||
panel->scrF = WMCreateFrame(panel->box);
|
panel->scrF = WMCreateFrame(panel->box);
|
||||||
|
|||||||
@@ -448,12 +448,12 @@ createPanel(Panel *p)
|
|||||||
RColor color;
|
RColor color;
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
color.red = 0xaa;
|
color.red = 0xae;
|
||||||
color.green = 0xae;
|
color.green = 0xaa;
|
||||||
color.blue = 0xaa;
|
color.blue = 0xae;
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/**************** Mouse Speed ****************/
|
/**************** Mouse Speed ****************/
|
||||||
panel->speedF = WMCreateFrame(panel->box);
|
panel->speedF = WMCreateFrame(panel->box);
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ createPanel(Panel *p)
|
|||||||
panel->font = WMSystemFontOfSize(scr, 12);
|
panel->font = WMSystemFontOfSize(scr, 12);
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
panel->tabv = WMCreateTabView(panel->box);
|
panel->tabv = WMCreateTabView(panel->box);
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ createPanel(Panel *p)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
/***************** Size Display ****************/
|
/***************** Size Display ****************/
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ createPanel(Panel *p)
|
|||||||
_Panel *panel = (_Panel*)p;
|
_Panel *panel = (_Panel*)p;
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
panel->saveB = WMCreateCommandButton(panel->box);
|
panel->saveB = WMCreateCommandButton(panel->box);
|
||||||
WMResizeWidget(panel->saveB, 154, 24);
|
WMResizeWidget(panel->saveB, 154, 24);
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
|
|||||||
|
|
||||||
|
|
||||||
#define FRAME_TOP 105
|
#define FRAME_TOP 105
|
||||||
#define FRAME_LEFT -1
|
#define FRAME_LEFT -2
|
||||||
#define FRAME_WIDTH 522
|
#define FRAME_WIDTH 524
|
||||||
#define FRAME_HEIGHT 235
|
#define FRAME_HEIGHT 235
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ createPanel(Panel *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 0, 0);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/***************** Workspace Navigation *****************/
|
/***************** Workspace Navigation *****************/
|
||||||
panel->navF = WMCreateFrame(panel->box);
|
panel->navF = WMCreateFrame(panel->box);
|
||||||
|
|||||||
@@ -631,8 +631,7 @@ handleButtonPress(XEvent *event)
|
|||||||
} else if (event->xbutton.button==wPreferences.select_button) {
|
} else if (event->xbutton.button==wPreferences.select_button) {
|
||||||
wUnselectWindows(scr);
|
wUnselectWindows(scr);
|
||||||
wSelectWindows(scr, event);
|
wSelectWindows(scr, event);
|
||||||
}
|
} else if (event->xbutton.button==Button5) {
|
||||||
else if (event->xbutton.button==Button5) {
|
|
||||||
wWorkspaceRelativeChange(scr, -1);
|
wWorkspaceRelativeChange(scr, -1);
|
||||||
} else if (event->xbutton.button==Button4) {
|
} else if (event->xbutton.button==Button4) {
|
||||||
wWorkspaceRelativeChange(scr, 1);
|
wWorkspaceRelativeChange(scr, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user