mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +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 "workspace.h"
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
|
|
||||||
#include "xinerama.h"
|
|
||||||
|
|
||||||
/******** Global variables ********/
|
/******** Global variables ********/
|
||||||
|
|
||||||
extern XContext wAppWinContext;
|
extern XContext wAppWinContext;
|
||||||
extern XContext wWinContext;
|
extern XContext wWinContext;
|
||||||
extern WPreferences wPreferences;
|
extern WPreferences wPreferences;
|
||||||
|
|
||||||
extern WDDomain *WDWindowAttributes;
|
extern WDDomain *WDWindowAttributes;
|
||||||
|
|
||||||
/******** Local variables ********/
|
/******** Local variables ********/
|
||||||
@@ -57,19 +54,15 @@ static WWindow *makeMainWindow(WScreen * scr, Window window)
|
|||||||
WWindow *wwin;
|
WWindow *wwin;
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
|
|
||||||
if (!XGetWindowAttributes(dpy, window, &attr)) {
|
if (!XGetWindowAttributes(dpy, window, &attr))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
wwin = wWindowCreate();
|
wwin = wWindowCreate();
|
||||||
wwin->screen_ptr = scr;
|
wwin->screen_ptr = scr;
|
||||||
wwin->client_win = window;
|
wwin->client_win = window;
|
||||||
wwin->main_window = window;
|
wwin->main_window = window;
|
||||||
wwin->wm_hints = XGetWMHints(dpy, 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);
|
PropGetWMClass(window, &wwin->wm_class, &wwin->wm_instance);
|
||||||
|
|
||||||
wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class,
|
wDefaultFillAttributes(scr, wwin->wm_instance, wwin->wm_class,
|
||||||
@@ -261,18 +254,16 @@ WApplication *wApplicationCreate(WWindow * wwin)
|
|||||||
int foo;
|
int foo;
|
||||||
unsigned int bar;
|
unsigned int bar;
|
||||||
/* check if the window is valid */
|
/* 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;
|
return NULL;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wapp = wApplicationOf(main_window);
|
wapp = wApplicationOf(main_window);
|
||||||
if (wapp) {
|
if (wapp) {
|
||||||
wapp->refcount++;
|
wapp->refcount++;
|
||||||
if (wapp->app_icon && wapp->app_icon->docked &&
|
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);
|
wDockFinishLaunch(wapp->app_icon->dock, wapp->app_icon);
|
||||||
}
|
|
||||||
|
|
||||||
return wapp;
|
return wapp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user