mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-24 23:22:30 +01:00
fixed crash bug with WM_CLASS==NULL
etc
This commit is contained in:
@@ -740,7 +740,7 @@ animateResizeZoom(WScreen *scr, int x, int y, int w, int h,
|
||||
#undef FRAMES
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
animateResize(WScreen *scr, int x, int y, int w, int h,
|
||||
int fx, int fy, int fw, int fh, int hiding)
|
||||
{
|
||||
|
||||
@@ -413,7 +413,6 @@ wApplicationCreate(WScreen *scr, Window main_window)
|
||||
if (!tmp)
|
||||
extractClientIcon(wapp->app_icon);
|
||||
}
|
||||
|
||||
/* set the application instance index */
|
||||
{
|
||||
WApplication *list = scr->wapp_list;
|
||||
@@ -424,14 +423,16 @@ wApplicationCreate(WScreen *scr, Window main_window)
|
||||
if (!WFLAGP(wwin, collapse_appicons))
|
||||
return 0;
|
||||
*/
|
||||
#define Xstreql(a, b) ((a) == (b) || (a && b && strcmp(a, b)==0))
|
||||
|
||||
|
||||
/* look for a free index # */
|
||||
while (list) {
|
||||
if (strcmp(wwin->wm_instance,
|
||||
list->main_window_desc->wm_instance) == 0
|
||||
if (Xstreql(wwin->wm_instance,
|
||||
list->main_window_desc->wm_instance)
|
||||
&&
|
||||
strcmp(wwin->wm_class,
|
||||
list->main_window_desc->wm_class) == 0) {
|
||||
Xstreql(wwin->wm_class,
|
||||
list->main_window_desc->wm_class)) {
|
||||
|
||||
if (list->index == index) {
|
||||
index++;
|
||||
|
||||
@@ -336,7 +336,7 @@ getLocalizedMenuFile(char *menu)
|
||||
if (!Locale)
|
||||
return NULL;
|
||||
|
||||
len = strlen(menu)+32;
|
||||
len = strlen(menu)+strlen(Locale)+8;
|
||||
buffer = wmalloc(len);
|
||||
|
||||
/* try menu.locale_name */
|
||||
|
||||
@@ -446,12 +446,35 @@ DoWindowBirth(WWindow *wwin)
|
||||
XFlush(dpy);
|
||||
}
|
||||
#else
|
||||
#ifdef WINDOW_BIRTH_ZOOM2
|
||||
extern void animateResize();
|
||||
|
||||
void DoWindowBirth(WWindow *wwin)
|
||||
{
|
||||
/* dummy stub */
|
||||
|
||||
int center_x, center_y;
|
||||
int width = wwin->frame->core->width;
|
||||
int height = wwin->frame->core->height;
|
||||
int w = WMIN(width, 20);
|
||||
int h = WMIN(height, 20);
|
||||
WScreen *scr = wwin->screen_ptr;
|
||||
|
||||
center_x = wwin->frame_x + (width - w) / 2;
|
||||
center_y = wwin->frame_y + (height - h) / 2;
|
||||
|
||||
animateResize(scr, center_x, center_y, 1, 1,
|
||||
wwin->frame_x , wwin->frame_y, width, height,
|
||||
0);
|
||||
}
|
||||
#else
|
||||
void
|
||||
DoWindowBirth(WWindow *wwin)
|
||||
{
|
||||
/* dummy stub */
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ UpdateSwitchMenu(WScreen *scr, WWindow *wwin, int action)
|
||||
WMenu *switchmenu = scr->switch_menu;
|
||||
WMenuEntry *entry;
|
||||
char title[MAX_MENU_TEXT_LENGTH+6];
|
||||
int len = MAX_MENU_TEXT_LENGTH+6;
|
||||
int len = sizeof(title);
|
||||
int i;
|
||||
int checkVisibility = 0;
|
||||
|
||||
|
||||
@@ -206,6 +206,8 @@
|
||||
*/
|
||||
#undef WINDOW_BIRTH_ZOOM
|
||||
|
||||
#define WINDOW_BIRTH_ZOOM2
|
||||
|
||||
/*
|
||||
* whether arrow drawing in clip buttons should be gradiented
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user