diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index 37663d70..4f3b80fc 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -16,6 +16,9 @@ Changes since wmaker 0.80.1: - New options in WMGLOBAL: AntialiasedText, AASystemFont and AABoldSystemFont. Check NEWS for details. - Fixed some improper calls to snprintf in wfont.c +- Added double buffering when drawing a WMFrame title with an AA font to avoid + flickering. +- Added double buffering when drawing WMList items to avoid flickering Changes since wmaker 0.80.0: diff --git a/WINGs/Tests/wtest.c b/WINGs/Tests/wtest.c index dcba89b5..04390025 100644 --- a/WINGs/Tests/wtest.c +++ b/WINGs/Tests/wtest.c @@ -240,7 +240,7 @@ testList(WMScreen *scr) list = WMCreateList(win); /*WMSetListAllowEmptySelection(list, True);*/ WMMoveWidget(list, 10, 40); - for (i=0; i<50; i++) { + for (i=0; i<14050; i++) { sprintf(text, "Item %i", i); WMAddListItem(list, text); } @@ -248,7 +248,7 @@ testList(WMScreen *scr) WMSetListAllowMultipleSelection(mlist, True); /*WMSetListAllowEmptySelection(mlist, True);*/ WMMoveWidget(mlist, 210, 40); - for (i=0; i<135; i++) { + for (i=0; i<14135; i++) { sprintf(text, "Item %i", i); WMAddListItem(mlist, text); } @@ -1293,6 +1293,7 @@ main(int argc, char **argv) testDragAndDrop(scr); testText(scr); testFontPanel(scr); + testList(scr); #if 0 testColorPanel(scr); testScrollView(scr); diff --git a/WINGs/WINGs/WINGsP.h b/WINGs/WINGs/WINGsP.h index b3e9eb55..68b34928 100644 --- a/WINGs/WINGs/WINGsP.h +++ b/WINGs/WINGs/WINGsP.h @@ -124,19 +124,21 @@ typedef struct W_Screen { int depth; Colormap colormap; - + Visual *visual; - + Time lastEventTime; - + Window rootWin; + struct _XftDraw *xftdraw; + struct W_View *rootView; - + RContext *rcontext; struct W_IMContext *imctx; - + /* application related */ W_FocusInfo *focusInfo; @@ -408,8 +410,8 @@ typedef struct W_EventHandler { typedef struct _WINGsConfiguration { char *systemFont; char *boldSystemFont; - char *aaSystemFont; - char *aaBoldSystemFont; + char *antialiasedSystemFont; + char *antialiasedBoldSystemFont; int defaultFontSize; Bool antialiasedText; Bool useMultiByte; diff --git a/WINGs/configuration.c b/WINGs/configuration.c index 92840c40..d3f674e0 100644 --- a/WINGs/configuration.c +++ b/WINGs/configuration.c @@ -65,11 +65,11 @@ W_ReadConfigurations(void) WINGsConfiguration.boldSystemFont = WMGetUDStringForKey(defaults, "BoldSystemFont"); - WINGsConfiguration.aaSystemFont = - WMGetUDStringForKey(defaults, "AASystemFont"); + WINGsConfiguration.antialiasedSystemFont = + WMGetUDStringForKey(defaults, "AntialiasedSystemFont"); - WINGsConfiguration.aaBoldSystemFont = - WMGetUDStringForKey(defaults, "AABoldSystemFont"); + WINGsConfiguration.antialiasedBoldSystemFont = + WMGetUDStringForKey(defaults, "AntialiasedBoldSystemFont"); #ifdef XFT WINGsConfiguration.antialiasedText = @@ -139,11 +139,11 @@ W_ReadConfigurations(void) if (!WINGsConfiguration.boldSystemFont) { WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT; } - if (!WINGsConfiguration.aaSystemFont) { - WINGsConfiguration.aaSystemFont = AASYSTEM_FONT; + if (!WINGsConfiguration.antialiasedSystemFont) { + WINGsConfiguration.antialiasedSystemFont = AASYSTEM_FONT; } - if (!WINGsConfiguration.aaBoldSystemFont) { - WINGsConfiguration.aaBoldSystemFont = AABOLD_SYSTEM_FONT; + if (!WINGsConfiguration.antialiasedBoldSystemFont) { + WINGsConfiguration.antialiasedBoldSystemFont = AABOLD_SYSTEM_FONT; } if (!WINGsConfiguration.floppyPath) { WINGsConfiguration.floppyPath = FLOPPY_PATH; diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c index 131bf80b..abba3eed 100644 --- a/WINGs/wbrowser.c +++ b/WINGs/wbrowser.c @@ -540,28 +540,39 @@ willResizeBrowser(W_ViewDelegate *self, WMView *view, static void -paintItem(WMList *lPtr, int index, Drawable d, char *text, int state, - WMRect *rect) +paintItem(WMList *lPtr, int index, Drawable drawable, char *text, int state, + WMRect *rect) { WMView *view = W_VIEW(lPtr); W_Screen *scr = view->screen; - int width, height, x, y; + Display *display = scr->display; + WMFont *font = ((state & WLDSIsBranch) ? scr->boldFont : scr->normalFont); + int width, height, x, y, textLen; + Drawable d = drawable; width = rect->size.width; height = rect->size.height; x = rect->pos.x; y = rect->pos.y; + textLen = strlen(text); +#ifdef DOUBLE_BUFFER_no + x = y = 0; + d = XCreatePixmap(display, drawable, width, height, scr->depth); if (state & WLDSSelected) - XFillRectangle(scr->display, d, WMColorGC(scr->white), x, y, - width, height); + XFillRectangle(display, d, WMColorGC(scr->white), 0, 0, width, height); else - XClearArea(scr->display, d, x, y, width, height, False); + XFillRectangle(display, d, WMColorGC(view->backColor), 0, 0, width, height); +#else + if (state & WLDSSelected) + XFillRectangle(display, d, WMColorGC(scr->white), x, y, width, height); + else + //XFillRectangle(display, d, WMColorGC(view->backColor), x, y, width, height); + XClearArea(display, d, x, y, width, height, False); +#endif if (text) { /* Avoid overlaping... */ - WMFont *font = (state & WLDSIsBranch) ? scr->boldFont : scr->normalFont; - int textLen = strlen(text); int widthC = (state & WLDSIsBranch) ? width-20 : width-8; if (WMWidthOfString(font, text, textLen) > widthC) { char *textBuf = createTruncatedString(font, text, &textLen, widthC); @@ -575,17 +586,23 @@ paintItem(WMList *lPtr, int index, Drawable d, char *text, int state, } if (state & WLDSIsBranch) { - XDrawLine(scr->display, d, WMColorGC(scr->darkGray), x+width-11, y+3, + XDrawLine(display, d, WMColorGC(scr->darkGray), x+width-11, y+3, x+width-6, y+height/2); if (state & WLDSSelected) - XDrawLine(scr->display, d,WMColorGC(scr->gray), x+width-11, y+height-5, + XDrawLine(display, d,WMColorGC(scr->gray), x+width-11, y+height-5, x+width-6, y+height/2); else - XDrawLine(scr->display, d,WMColorGC(scr->white), x+width-11, y+height-5, + XDrawLine(display, d,WMColorGC(scr->white), x+width-11, y+height-5, x+width-6, y+height/2); - XDrawLine(scr->display, d, WMColorGC(scr->black), x+width-12, y+3, + XDrawLine(display, d, WMColorGC(scr->black), x+width-12, y+3, x+width-12, y+height-5); } + +#ifdef DOUBLE_BUFFER_no + XCopyArea(display, d, drawable, scr->copyGC, 0, 0, width, height, + rect->pos.x, rect->pos.y); + XFreePixmap(display, d); +#endif } diff --git a/WINGs/wfont.c b/WINGs/wfont.c index c9d94f9b..a2dd6565 100644 --- a/WINGs/wfont.c +++ b/WINGs/wfont.c @@ -291,8 +291,8 @@ WMCreateFont(WMScreen *scrPtr, char *fontName) if (scrPtr->useMultiByte) { return WMCreateFontSet(scrPtr, fontName); } else if (scrPtr->antialiasedText) { - /*// should revert to normal if this fails? */ - return WMCreateAAFont(scrPtr, fontName); + WMFont *font = WMCreateAAFont(scrPtr, fontName); + return font ? font : WMCreateNormalFont(scrPtr, fontName); } else { return WMCreateNormalFont(scrPtr, fontName); } @@ -373,13 +373,15 @@ makeSystemFontOfSize(WMScreen *scrPtr, int size, Bool bold) WMFont *font; char *fontSpec, *aaFontSpec; +#define WConf WINGsConfiguration if (bold) { - fontSpec = makeFontSetOfSize(WINGsConfiguration.boldSystemFont, size); - aaFontSpec = makeFontSetOfSize(WINGsConfiguration.aaBoldSystemFont, size); + fontSpec = makeFontSetOfSize(WConf.boldSystemFont, size); + aaFontSpec = makeFontSetOfSize(WConf.antialiasedBoldSystemFont, size); } else { - fontSpec = makeFontSetOfSize(WINGsConfiguration.systemFont, size); - aaFontSpec = makeFontSetOfSize(WINGsConfiguration.aaSystemFont, size); + fontSpec = makeFontSetOfSize(WConf.systemFont, size); + aaFontSpec = makeFontSetOfSize(WConf.antialiasedSystemFont, size); } +#undef WConf if (scrPtr->useMultiByte) { font = WMCreateFontSet(scrPtr, fontSpec); @@ -497,7 +499,6 @@ WMDrawString(WMScreen *scr, Drawable d, WMColor *color, WMFont *font, if (font->antialiased) { #ifdef XFT XftColor xftcolor; - XftDraw *xftdraw; xftcolor.color.red = color->color.red; xftcolor.color.green = color->color.green; @@ -505,13 +506,10 @@ WMDrawString(WMScreen *scr, Drawable d, WMColor *color, WMFont *font, xftcolor.color.alpha = color->alpha;; xftcolor.pixel = W_PIXEL(color); - /* //share if possible */ - xftdraw = XftDrawCreate(scr->display, d, scr->visual, scr->colormap); + XftDrawChange(scr->xftdraw, d); - XftDrawString8(xftdraw, &xftcolor, font->font.xft, + XftDrawString8(scr->xftdraw, &xftcolor, font->font.xft, x, y + font->y, text, length); - - XftDrawDestroy(xftdraw); #else assert(False); #endif @@ -540,7 +538,6 @@ WMDrawImageString(WMScreen *scr, Drawable d, WMColor *color, WMColor *background #ifdef XFT XftColor textColor; XftColor bgColor; - XftDraw *xftdraw; textColor.color.red = color->color.red; textColor.color.green = color->color.green; @@ -554,16 +551,14 @@ WMDrawImageString(WMScreen *scr, Drawable d, WMColor *color, WMColor *background bgColor.color.alpha = background->alpha;; bgColor.pixel = W_PIXEL(background); - /* //share if possible */ - xftdraw = XftDrawCreate(scr->display, d, scr->visual, scr->colormap); - XftDrawRect(xftdraw, &bgColor, x, y, + XftDrawChange(scr->xftdraw, d); + + XftDrawRect(scr->xftdraw, &bgColor, x, y, WMWidthOfString(font, text, length), font->height); - XftDrawString8(xftdraw, &textColor, font->font.xft, x, y + font->y, - text, length); - - XftDrawDestroy(xftdraw); + XftDrawString8(scr->xftdraw, &textColor, font->font.xft, + x, y + font->y, text, length); #else assert(False); #endif diff --git a/WINGs/wframe.c b/WINGs/wframe.c index 12b32575..e00fbb50 100644 --- a/WINGs/wframe.c +++ b/WINGs/wframe.c @@ -82,16 +82,20 @@ paintFrame(Frame *fPtr) { W_View *view = fPtr->view; W_Screen *scrPtr = view->screen; - int tx, ty, tw, th; + WMFont *font = scrPtr->normalFont; + Display *display = scrPtr->display; + int tx, ty, tw, th, tlen; int fy, fh; Bool drawTitle; - - if (fPtr->caption!=NULL) - th = WMFontHeight(scrPtr->normalFont); - else { - th = 0; + + if (fPtr->caption!=NULL) { + th = WMFontHeight(font); + tlen = strlen(fPtr->caption); + } else { + th = 0; + tlen = 0; } - + fh = view->size.height; fy = 0; @@ -139,12 +143,11 @@ paintFrame(Frame *fPtr) } if (fPtr->caption!=NULL && fPtr->flags.titlePosition!=WTPNoTitle) { - tw = WMWidthOfString(scrPtr->normalFont, fPtr->caption, - strlen(fPtr->caption)); + tw = WMWidthOfString(font, fPtr->caption, tlen); - tx = (view->size.width - tw) / 2; - - drawTitle = True; + tx = (view->size.width - tw) / 2; + + drawTitle = True; } else { drawTitle = False; } @@ -180,7 +183,7 @@ paintFrame(Frame *fPtr) gc[3] = WMColorGC(scrPtr->white); for (i = 0; i < 4; i++) { - XSetRegion(scrPtr->display, gc[i], region); + XSetRegion(display, gc[i], region); } XDestroyRegion(region); @@ -188,13 +191,31 @@ paintFrame(Frame *fPtr) fPtr->flags.relief, gc[0], gc[1], gc[2], gc[3]); for (i = 0; i < 4; i++) { - XSetClipMask(scrPtr->display, gc[i], None); + XSetClipMask(display, gc[i], None); } } if (drawTitle) { - WMDrawString(scrPtr, view->window, scrPtr->black, scrPtr->normalFont, - tx, ty, fPtr->caption, strlen(fPtr->caption)); + /* can't draw AA text over and over again because it gets messed */ + if (font->antialiased) { +#ifdef DOUBLE_BUFFER + Drawable d; + + d = XCreatePixmap(display, view->window, tw, th, scrPtr->depth); + XFillRectangle(display, d, WMColorGC(view->backColor), 0, 0, tw, th); + + WMDrawString(scrPtr, d, scrPtr->black, font, 0, 0, fPtr->caption, tlen); + XCopyArea(display, d, view->window, scrPtr->copyGC, 0, 0, tw, th, tx, ty); + XFreePixmap(display, d); +#else + XClearArea(display, view->window, tx, ty, tw, th, False); + WMDrawString(scrPtr, view->window, scrPtr->black, font, tx, ty, + fPtr->caption, tlen); +#endif + } else { + WMDrawString(scrPtr, view->window, scrPtr->black, font, tx, ty, + fPtr->caption, tlen); + } } } diff --git a/WINGs/widgets.c b/WINGs/widgets.c index cfad24f0..282c36eb 100644 --- a/WINGs/widgets.c +++ b/WINGs/widgets.c @@ -3,6 +3,10 @@ #include "WINGsP.h" #include "wconfig.h" +#ifdef XFT +# include +#endif + #include #include #include @@ -620,6 +624,10 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context) scrPtr->fontSetCache = WMCreateHashTable(WMStringPointerHashCallbacks); +#ifdef XFT + scrPtr->xftdraw = XftDrawCreate(scrPtr->display, W_DRAWABLE(scrPtr), + scrPtr->visual, scrPtr->colormap); +#endif /* create input method stuff */ W_InitIMStuff(scrPtr); @@ -1037,7 +1045,7 @@ WMWidgetIsMapped(WMWidget *w) void WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color) -{ +{ W_SetViewBackgroundColor(W_VIEW(w), color); if (W_VIEW(w)->flags.mapped) WMRedisplayWidget(w); diff --git a/WINGs/wlist.c b/WINGs/wlist.c index 83bc8a31..8b250ffb 100644 --- a/WINGs/wlist.c +++ b/WINGs/wlist.c @@ -491,7 +491,8 @@ paintItem(List *lPtr, int index) { WMView *view = lPtr->view; W_Screen *scr = view->screen; - int width, height, x, y; + Display *display = scr->display; + int width, height, x, y, tlen; WMListItem *itemPtr; itemPtr = WMGetFromArray(lPtr->items, index); @@ -500,11 +501,14 @@ paintItem(List *lPtr, int index) height = lPtr->itemHeight; x = 19; y = 2 + (index-lPtr->topItem) * lPtr->itemHeight + 1; + tlen = strlen(itemPtr->text); if (lPtr->flags.userDrawn) { WMRect rect; + Drawable d = view->window; int flags; + rect.size.width = width; rect.size.height = height; rect.pos.x = x; @@ -518,20 +522,41 @@ paintItem(List *lPtr, int index) if (itemPtr->isBranch) flags |= WLDSIsBranch; +#ifdef DOUBLE_BUFFER_no + d = XCreatePixmap(display, view->window, view->size.width, + view->size.height, scr->depth); +#endif + if (lPtr->draw) - (*lPtr->draw)(lPtr, index, view->window, itemPtr->text, flags, - &rect); + (*lPtr->draw)(lPtr, index, d, itemPtr->text, flags, &rect); + +#ifdef DOUBLE_BUFFER_no + XCopyArea(display, d, view->window, scr->copyGC, x, y, width, height, x, y); + XFreePixmap(display, d); +#endif } else { +#ifdef DOUBLE_BUFFER + WMColor *back = (itemPtr->selected ? scr->white : view->backColor); + Drawable d; + + d = XCreatePixmap(display, view->window, width, height, scr->depth); + XFillRectangle(display, d, WMColorGC(back), 0, 0, width, height); + + W_PaintText(view, d, scr->normalFont, 4, 0, width, WALeft, scr->black, + False, itemPtr->text, tlen); + XCopyArea(display, d, view->window, scr->copyGC, 0, 0, width, height, x, y); + XFreePixmap(display, d); +#else if (itemPtr->selected) { - XFillRectangle(scr->display, view->window, WMColorGC(scr->white), + XFillRectangle(display, view->window, WMColorGC(scr->white), x, y, width, height); } else { - XClearArea(scr->display, view->window, x, y, width, height, False); + XClearArea(display, view->window, x, y, width, height, False); } W_PaintText(view, view->window, scr->normalFont, x+4, y, width, - WALeft, scr->black, False, - itemPtr->text, strlen(itemPtr->text)); + WALeft, scr->black, False, itemPtr->text, tlen); +#endif } if ((index-lPtr->topItem+lPtr->fullFitLines)*lPtr->itemHeight > diff --git a/WINGs/wmisc.c b/WINGs/wmisc.c index 71d60c80..db05c624 100644 --- a/WINGs/wmisc.c +++ b/WINGs/wmisc.c @@ -201,33 +201,28 @@ W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor, W_Font *font, int x, y, w, h; Drawable d = view->window; - + #ifdef DOUBLE_BUFFER d = XCreatePixmap(screen->display, view->window, view->size.width, view->size.height, screen->depth); #endif - + /* background */ -#ifndef DOUBLE_BUFFER if (backColor) { XFillRectangle(screen->display, d, WMColorGC(backColor), 0, 0, view->size.width, view->size.height); } else { +#ifndef DOUBLE_BUFFER XClearWindow(screen->display, d); - } #else - if (backColor) - XFillRectangle(screen->display, d, WMColorGC(backColor), 0, 0, - view->size.width, view->size.height); - else { XSetForeground(screen->display, screen->copyGC, view->attribs.background_pixel); XFillRectangle(screen->display, d, screen->copyGC, 0, 0, view->size.width, view->size.height); - } #endif + } + - if (relief == WRFlat) { x = 0; y = 0; @@ -305,11 +300,11 @@ W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor, W_Font *font, W_PaintText(view, d, font, x+ofs+4, y+ofs + (h-textHeight)/2, w-8, alignment, textColor, wrap, text, strlen(text)); } - - + + /* draw relief */ W_DrawRelief(screen, d, 0, 0, view->size.width, view->size.height, relief); - + #ifdef DOUBLE_BUFFER XCopyArea(screen->display, d, view->window, screen->copyGC, 0, 0, view->size.width, view->size.height, 0, 0); diff --git a/WPrefs.app/KeyboardShortcuts.c b/WPrefs.app/KeyboardShortcuts.c index 9844e1de..9aa54edd 100644 --- a/WPrefs.app/KeyboardShortcuts.c +++ b/WPrefs.app/KeyboardShortcuts.c @@ -440,10 +440,10 @@ paintItem(WMList *lPtr, int index, Drawable d, char *text, int state, y = rect->pos.y; if (state & WLDSSelected) - XFillRectangle(dpy, d, WMColorGC(panel->white), x, y, width, - height); - else - XClearArea(dpy, d, x, y, width, height, False); + XFillRectangle(dpy, d, WMColorGC(panel->white), x, y, width, height); + else + //XClearArea(dpy, d, x, y, width, height, False); + XFillRectangle(dpy, d, WMColorGC(WMGrayColor(scr)), x, y, width, height); if (panel->shortcuts[index]) { WMPixmap *pix = WMGetSystemPixmap(scr, WSICheckMark); diff --git a/WindowMaker/Defaults/WMGLOBAL b/WindowMaker/Defaults/WMGLOBAL index f7808eb0..da171924 100644 --- a/WindowMaker/Defaults/WMGLOBAL +++ b/WindowMaker/Defaults/WMGLOBAL @@ -1,8 +1,8 @@ { SystemFont = "-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-medium-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*"; BoldSystemFont = "-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-*-*,-*-*-bold-r-normal-*-%d-*,-*-*-medium-r-normal-*-*-*"; - AASystemFont = "-*-arial-medium-r-normal-*-%d-*-*-*-*-*-*-*"; - AABoldSystemFont = "-*-arial-bold-r-normal-*-%d-*-*-*-*-*-*-*"; + AntialiasedSystemFont = "-*-trebuchet ms-medium-r-normal-*-%d-*-*-*-*-*-*-*"; + AntialiasedBoldSystemFont = "-*-trebuchet ms-bold-r-normal-*-%d-*-*-*-*-*-*-*"; DefaultFontSize = 12; AntialiasedText = NO; MultiByteText = AUTO; diff --git a/po/README b/po/README index 99ff328f..b3f6e791 100644 --- a/po/README +++ b/po/README @@ -85,7 +85,7 @@ with a .po extension, reconfigure WindowMaker and run make install. To update an already translated message file use the msgmerge command. As in: -msgmerge WindowMaker.pot pt.po > pt.po.new +msgmerge pt.po WindowMaker.pot > pt.po.new If you use an older version of gettext, the command is tupdate, instead of msgmerge. diff --git a/src/Makefile.am b/src/Makefile.am index 505da2c0..4a752f60 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -115,8 +115,8 @@ INCLUDES = \ wmaker_LDADD = \ $(top_builddir)/WINGs/libWINGs.a\ $(top_builddir)/wrlib/libwraster.la\ - @XLIBS@ \ @XFTLIBS@ \ + @XLIBS@ \ @INTLIBS@ \ @DLLIBS@ diff --git a/src/gnome.c b/src/gnome.c index 1768c5cb..33759b76 100644 --- a/src/gnome.c +++ b/src/gnome.c @@ -650,7 +650,8 @@ wGNOMERemoveClient(WWindow *wwin) -static void observer(void *self, WMNotification *notif) +static void +observer(void *self, WMNotification *notif) { WWindow *wwin = (WWindow*)WMGetNotificationObject(notif); const char *name = WMGetNotificationName(notif); @@ -665,10 +666,12 @@ static void observer(void *self, WMNotification *notif) wGNOMEUpdateClientStateHint(wwin, True); } else if (strcmp(name, WMNChangedState) == 0 && wwin) { wGNOMEUpdateClientStateHint(wwin, False); - } + } } -static void wsobserver(void *self, WMNotification *notif) + +static void +wsobserver(void *self, WMNotification *notif) { WScreen *scr = (WScreen*)WMGetNotificationObject(notif); const char *name = WMGetNotificationName(notif); @@ -681,10 +684,8 @@ static void wsobserver(void *self, WMNotification *notif) wGNOMEUpdateWorkspaceNamesHint(scr); } else if (strcmp(name, WMNWorkspaceChanged) == 0) { wGNOMEUpdateCurrentWorkspaceHint(scr); - - } else if (strcmp(name, WMNResetStacking) == 0) { - + } } diff --git a/src/openlook.c b/src/openlook.c index 6ce13657..a3e3c219 100644 --- a/src/openlook.c +++ b/src/openlook.c @@ -352,6 +352,9 @@ wOLWMCheckClientHints(WWindow *wwin) menuType = MT_LIMITED; + /* this is a transient-like window */ + wwin->client_flags.olwm_transient = 1; + } else if (hints.winType == WT_NOTICE) { decoration = OL_DECORATION_ICONNAME; @@ -397,11 +400,6 @@ wOLWMCheckClientHints(WWindow *wwin) else wwin->flags.olwm_limit_menu = 1; - /* this is a transient-like window */ - if (hints.winType == WT_CMD) { - wwin->client_flags.olwm_transient = 1; - } - /* * Emulate olwm pushpin. * If the initial state of the pin is in, then put the normal close diff --git a/src/screen.h b/src/screen.h index 72cd47c9..a787659d 100644 --- a/src/screen.h +++ b/src/screen.h @@ -139,11 +139,11 @@ typedef struct _WScreen { * by other clients (not us) */ WArea totalUsableArea; /* same as above, but including * the dock and other stuff */ - + WMPixel black_pixel; WMPixel white_pixel; - + WMPixel light_pixel; WMPixel dark_pixel;