Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac.footer
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ No|no|N|n) SHARED_LIBS=-lc ;;
AC_CHECK_LIB($i, wgetch,,,$TERMLIBS)
else :; fi
done
SHARED_LIBS="$LIBS $TERMLIBS -lc"
SHARED_LIBS="-lc"
LIBS=$SAVELIBS ;;
esac

Expand Down
14 changes: 14 additions & 0 deletions contrib/systemd/gpm.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Console Mouse manager

# This could probably benefit from socket activation, but honestly I think it
# is time for gpm to go away, and hence I am not planning to spend the time
# to add socket activation here.

[Service]
ExecStart=/usr/sbin/gpm -m /dev/input/mice -t exps2
Type=forking
PIDFile=/run/gpm.pid

[Install]
WantedBy=multi-user.target
6 changes: 3 additions & 3 deletions doc/doc.gpm.in
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ error. When the document refer to ``standard serial options'' it means
that one of @t{\-o dtr}, @t{\-o rts}, @t{\-o both} can be specified to
toggle the control lines of the serial port.

The following mouse type are corrently recognized:
The following mouse type are currently recognized:

@table @code
@item bare Microsoft
Expand All @@ -621,7 +621,7 @@ The following mouse type are corrently recognized:
this is your case, use the @samp{bare} mouse type. Some new
two-button devices are ``plug and play'', and they don't play
fair at all; in this case try @t{\-t pnp}. Many (most)
three-button devices that use the microsoft protocol fail to
three-button devices that use the Microsoft protocol fail to
report some middle-button events during mouse motion. Since
the protocol does not distinguish between the middle button
going up and the middle button going down it would be liable
Expand Down Expand Up @@ -649,7 +649,7 @@ The following mouse type are corrently recognized:
decoder gets into a confused state where it thinks the middle
button is up when it's down and vice versa. (If you get sick
of having to do this, please don't blame gpm; blame your buggy
mouse! Note that most three-button mice that do the microsoft
mouse! Note that most three-button mice that do the Microsoft
protocol can be made to do the MouseSystems protocol
instead. The ``3 Button Serial Mouse mini-HOWTO'' has
information about this.) This mouse decoder accepts standard
Expand Down
7 changes: 7 additions & 0 deletions src/daemon/startup.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ void startup(int argc, char **argv)
check_uniqueness();
gpm_report(GPM_PR_INFO,GPM_MESS_STARTED);

// close extra fds
if (option.run_status == GPM_RUN_STARTUP ) {
close(0);
close(1);
close(2);
}

//return mouse_table[1].fd; /* the second is handled in the main() */

/****************** OLD CODE from gpn.c END ***********************/
Expand Down
7 changes: 6 additions & 1 deletion src/lib/libcurses.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
#endif /* HAVE_NCURSES_CURSES_H */
#endif /* HAVE_NCURSES_H */

#define GET(win) ((win) ? wgetch(win) : getch())
/* If win != NULL, it must have been created by ncurses anyway.
Avoid circular library dependencies. */
#pragma weak wgetch
#pragma weak stdscr

#define GET(win) ((win && wgetch) ? wgetch(win) : getch())

int Gpm_Wgetch(WINDOW *win)
{
Expand Down
8 changes: 8 additions & 0 deletions src/lib/report-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,16 @@

#include "headers/message.h"

static int gpm_silent() {
if ( getenv( "GPM_VERBOSE" ) == NULL ) return 1;
return 0;
}

void gpm_report(int line, const char *file, int stat, const char *text, ... )
{
if ( gpm_silent() && stat != GPM_STAT_OOPS )
return;

const char *string = NULL;
int log_level;
va_list ap;
Expand Down