Skip to content

Commit

Permalink
Let's say it's 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
steelman committed Apr 22, 2016
1 parent 321e874 commit 9a098cf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*~
*.swp
.\#*
\#*\#
xystray
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LDFLAGS=-lXt -L/usr/X11/lib
LDFLAGS=-lX11 -lXt -L/usr/X11/lib
xystray: Xystray.o xystray.o
$(CC) $(LDFLAGS) $^ -o $@

Expand Down
14 changes: 7 additions & 7 deletions Xystray.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
Expand Down Expand Up @@ -75,10 +77,10 @@ XystrayClassRec xystrayClassRec = {
/* num_actions */ 0,
/* resources */ resources,
/* resource_count */ XtNumber(resources),
/* xrm_class */ NULLQUARK,
/* xrm_class */ NULLQUARK,
/* compress_motion */ TRUE,
/* compress_exposure */ XtExposeCompressMaximal,
/* compress_enterleave */ TRUE,
/* compress_enterleave */ TRUE,
/* visible_interest */ FALSE,
/* destroy */ XWtDestroy,
/* resize */ NULL,
Expand All @@ -96,7 +98,7 @@ XystrayClassRec xystrayClassRec = {
/* extension */ NULL
}, { 0 }
};

WidgetClass xystrayWidgetClass = (WidgetClass) &xystrayClassRec;

static void
Expand Down Expand Up @@ -281,7 +283,6 @@ XWtEventHandler(Widget gw, XPointer xptr, XEvent* xev, Boolean* cont) {
}

static void XWtRecvMessage(XystrayWidget xys, XClientMessageEvent* xev) {

Atom selection_msg = xys->xystray.selection_atom; /*XXX: potrzebne?*/
Atom opcode_msg = xys->xystray.opcode_atom;
Atom data_msg = xys->xystray.data_atom;
Expand Down Expand Up @@ -319,10 +320,9 @@ static void XWtRecvMessage(XystrayWidget xys, XClientMessageEvent* xev) {
if (xev->format != 8) {
return;
}
printf("Data Message: (%d)%s\n", xev->message_type,b);

printf("Data Message: (%d)%s\n", (int)xev->message_type,b);
} else {
printf("Unknown Message: (%d)%s\n", xev->message_type,b);
printf("Unknown Message: (%d)%s\n", (int)xev->message_type,b);
}
XFree(b);
return;
Expand Down
4 changes: 2 additions & 2 deletions xystray.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void sigint(XtPointer topwidget, XtSignalId* sig) {
XtDestroyWidget(tw);
XtDestroyApplicationContext(XtWidgetToApplicationContext(tw));
exit(0);
}
}

static void
quit(Widget w, XEvent *event, String *params, Cardinal *num_params) {
Expand Down Expand Up @@ -115,7 +115,7 @@ main (int argc, char *argv[])
NULL);

XtAppAddActions (app_con, xysact, XtNumber(xysact));
XtOverrideTranslations(topwidget,
XtOverrideTranslations(topwidget,
XtParseTranslationTable ("<Message>WM_PROTOCOLS: quit()"));


Expand Down

0 comments on commit 9a098cf

Please sign in to comment.