Rename more X11 functions

This commit is contained in:
Jacob 2023-08-07 06:23:56 +02:00
parent 61d81819f4
commit 2e719a603f
3 changed files with 11 additions and 32 deletions

View file

@ -24,14 +24,14 @@ void eventloop_x11(void) {
case FocusIn: case FocusIn:
// regrab focus from parent window // regrab focus from parent window
if (ev.xfocus.window != win) if (ev.xfocus.window != win)
grabfocus(); grabfocus_x11();
break; break;
case KeyPress: // read key array and call functions case KeyPress: // read key array and call functions
keypress_x11(&ev); keypress_x11(&ev);
break; break;
case SelectionNotify: // paste selection case SelectionNotify: // paste selection
if (ev.xselection.property == utf8) if (ev.xselection.property == utf8)
pastesel(); pastesel_x11();
break; break;
case VisibilityNotify: case VisibilityNotify:
if (ev.xvisibility.state != VisibilityUnobscured) if (ev.xvisibility.state != VisibilityUnobscured)

View file

@ -112,7 +112,7 @@ void setupdisplay_x11(void) {
XFree(dws); XFree(dws);
} }
grabfocus(); grabfocus_x11();
} }
// resize window and draw // resize window and draw

View file

@ -180,15 +180,6 @@ static struct item *nextitem; // next item
static struct item *selecteditem; // selected item static struct item *selecteditem; // selected item
static struct item *mouseitem; // clicked item static struct item *mouseitem; // clicked item
// various headers
#include "libs/draw.h"
#include "libs/stream.h"
#include "libs/arg.h"
#include "libs/x11/inc.h"
#include "libs/wl/inc.h"
#include "libs/sort.h"
#include "libs/history.h"
static Draw_t *draw; // Draw_t type, see libs/draw/draw.c static Draw_t *draw; // Draw_t type, see libs/draw/draw.c
// high priority // high priority
@ -230,16 +221,18 @@ static char * cistrstr(const char *s, const char *sub);
static int (*fstrncmp)(const char *, const char *, size_t) = strncasecmp; static int (*fstrncmp)(const char *, const char *, size_t) = strncasecmp;
static char *(*fstrstr)(const char *, const char *) = cistrstr; static char *(*fstrstr)(const char *, const char *) = cistrstr;
#if USEX
static void pastesel(void);
static void grabfocus(void);
#endif
static char **list; static char **list;
static size_t listsize; static size_t listsize;
// user configuration // various headers
#include "libs/options.h" #include "libs/options.h"
#include "libs/draw.h"
#include "libs/stream.h"
#include "libs/arg.h"
#include "libs/x11/inc.h"
#include "libs/wl/inc.h"
#include "libs/sort.h"
#include "libs/history.h"
static char *fonts[] = { font }; static char *fonts[] = { font };
@ -482,12 +475,6 @@ char * cistrstr(const char *h, const char *n) {
return NULL; return NULL;
} }
#if USEX
void grabfocus(void) {
grabfocus_x11();
}
#endif
void insert(const char *str, ssize_t n) { void insert(const char *str, ssize_t n) {
if (strlen(tx.text) + n > sizeof tx.text - 1) if (strlen(tx.text) + n > sizeof tx.text - 1)
return; // length of text should not exceed size return; // length of text should not exceed size
@ -537,14 +524,6 @@ size_t nextrune(int inc) {
return rune; return rune;
} }
#if USEX
void pastesel(void) {
if (!protocol) {
pastesel_x11();
}
}
#endif
void resizeclient(void) { void resizeclient(void) {
#if USEWAYLAND #if USEWAYLAND
if (protocol) { if (protocol) {