mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Coding style cleanup in application.c
Changes to application.c: - Curly brackets - Code commented - Include not used
This commit is contained in:
committed by
Carlos R. Mafra
parent
dd6a54bba5
commit
fbab31b798
@@ -40,14 +40,11 @@
|
||||
#include "workspace.h"
|
||||
#include "dock.h"
|
||||
|
||||
#include "xinerama.h"
|
||||
|
||||
/******** Global variables ********/
|
||||
|
||||
extern XContext wAppWinContext;
|
||||
extern XContext wWinContext;
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
extern WDDomain *WDWindowAttributes;
|
||||
|
||||
/******** Local variables ********/
|
||||
@@ -57,19 +54,15 @@ static WWindow *makeMainWindow(WScreen * scr, Window window)
|
||||
WWindow *wwin;
|
||||
XWindowAttributes attr;
|
||||
|
||||
if (!XGetWindowAttributes(dpy, window, &attr)) {
|
||||
if (!XGetWindowAttributes(dpy, window, &attr))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wwin = wWindowCreate();
|
||||
wwin->screen_ptr = scr;
|
||||
wwin->client_win = window;
|
||||
wwin->main_window = window;
|
||||
wwin->wm_hints = XGetWMHints(dpy, window);
|
||||
/* if (!MyXFetchName(dpy, window, &(wwin->frame->title))) {
|
||||
wwin->frame->title = NULL;
|
||||
}
|
||||
*/
|
||||
|
||||
PropGetWMClass(window, &wwin->wm_class, &wwin->wm_instance);
|
||||
|
||||
wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class,
|
||||
@@ -261,18 +254,16 @@ WApplication *wApplicationCreate(WWindow * wwin)
|
||||
int foo;
|
||||
unsigned int bar;
|
||||
/* check if the window is valid */
|
||||
if (!XGetGeometry(dpy, main_window, &root, &foo, &foo, &bar, &bar, &bar, &bar)) {
|
||||
if (!XGetGeometry(dpy, main_window, &root, &foo, &foo, &bar, &bar, &bar, &bar))
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
wapp = wApplicationOf(main_window);
|
||||
if (wapp) {
|
||||
wapp->refcount++;
|
||||
if (wapp->app_icon && wapp->app_icon->docked &&
|
||||
wapp->app_icon->relaunching && wapp->main_window_desc->fake_group) {
|
||||
wapp->app_icon->relaunching && wapp->main_window_desc->fake_group)
|
||||
wDockFinishLaunch(wapp->app_icon->dock, wapp->app_icon);
|
||||
}
|
||||
|
||||
return wapp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user