Move program title to "src/main.c"
This commit is contained in:
parent
9f1b2ef0da
commit
69e0c4185c
|
@ -1,7 +1,5 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
static const char wm_name[] = "PolytreeWM";
|
||||
|
||||
/* appearance */
|
||||
|
||||
static const char *fonts[] = { "monospace:size=10" };
|
||||
|
|
12
src/dwm.c
12
src/dwm.c
|
@ -229,6 +229,8 @@ static void zoom(const Arg *arg);
|
|||
* variables *
|
||||
*************/
|
||||
|
||||
static const char *program_title = NULL;
|
||||
|
||||
static struct Screen screen = {
|
||||
.sizes = { 0, 0 },
|
||||
.x_screen = 0,
|
||||
|
@ -280,8 +282,12 @@ static void (*handler[LASTEvent])(XEvent*) = {
|
|||
* Public function implementations *
|
||||
***********************************/
|
||||
|
||||
int dwm_main()
|
||||
int dwm_main(const char *const new_program_title)
|
||||
{
|
||||
if (!(program_title = new_program_title)) {
|
||||
fatal("no program title is given");
|
||||
}
|
||||
|
||||
if (!XSupportsLocale()) {
|
||||
warning("no locale support in X");
|
||||
}
|
||||
|
@ -2195,8 +2201,8 @@ void wmcheckwin_create()
|
|||
8,
|
||||
PropModeReplace,
|
||||
(unsigned char*)
|
||||
wm_name,
|
||||
strlen(wm_name)
|
||||
program_title,
|
||||
strlen(program_title)
|
||||
);
|
||||
XChangeProperty(
|
||||
dpy,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _DWM_H
|
||||
#define _DWM_H
|
||||
|
||||
int dwm_main();
|
||||
int dwm_main(const char *program_title);
|
||||
|
||||
#endif // _DWM_H
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PROGRAM_TITLE "PolytreeWM"
|
||||
#define PROGRAM_NAME "polytreewm"
|
||||
|
||||
static char *program_exe = NULL;
|
||||
|
@ -57,7 +58,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
exit(dwm_main(argc, argv));
|
||||
exit(dwm_main(PROGRAM_TITLE));
|
||||
}
|
||||
|
||||
void signal_callback(const int signo)
|
||||
|
|
Loading…
Reference in New Issue