Tidying style

This commit is contained in:
bakkeby 2019-11-21 12:09:05 +01:00
parent 42b66d4b29
commit 5fa724da0d
3 changed files with 37 additions and 23 deletions

View File

@ -8,7 +8,8 @@
#define MPDHOST "localhost" #define MPDHOST "localhost"
#define MPDPORT 6600 #define MPDPORT 6600
struct mpd_connection *get_conn(){ struct mpd_connection *get_conn()
{
struct mpd_connection *conn; struct mpd_connection *conn;
conn = mpd_connection_new(MPDHOST, MPDPORT, 1000); conn = mpd_connection_new(MPDHOST, MPDPORT, 1000);
@ -23,7 +24,8 @@ struct mpd_connection *get_conn(){
return conn; return conn;
} }
void mpdchange(const Arg *direction){ void mpdchange(const Arg *direction)
{
struct mpd_connection *conn; struct mpd_connection *conn;
conn = get_conn(); conn = get_conn();
@ -42,7 +44,8 @@ void mpdchange(const Arg *direction){
mpd_connection_free(conn); mpd_connection_free(conn);
} }
char *get_regerror(int errcode, regex_t *compiled){ char *get_regerror(int errcode, regex_t *compiled)
{
size_t length = regerror(errcode, compiled, NULL, 0); size_t length = regerror(errcode, compiled, NULL, 0);
char *buffer = malloc(length); char *buffer = malloc(length);
(void) regerror(errcode, compiled, buffer, length); (void) regerror(errcode, compiled, buffer, length);
@ -50,7 +53,8 @@ char *get_regerror(int errcode, regex_t *compiled){
return buffer; return buffer;
} }
void mpdcontrol(){ void mpdcontrol()
{
struct mpd_connection *conn; struct mpd_connection *conn;
struct mpd_status *status; struct mpd_status *status;
struct mpd_song *song; struct mpd_song *song;

View File

@ -1,7 +1,17 @@
void void
togglefullscreen(const Arg *arg) { togglefullscreen(const Arg *arg)
{
if (!selmon->sel) if (!selmon->sel)
return; return;
#if FAKEFULLSCREEN_CLIENT_PATCH
if (selmon->sel->fakefullscreen) {
selmon->sel->fakefullscreen = 0;
if (selmon->sel->isfullscreen) {
selmon->sel->isfullscreen = 0;
}
}
#endif // FAKEFULLSCREEN_CLIENT_PATCH
setfullscreen(selmon->sel, !selmon->sel->isfullscreen); setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
} }