aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-10 22:12:30 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-10 22:12:30 +0200
commita4fd80b4ec1a2c2abc936312c73e0ed0133f1a39 (patch)
treed1d8e19e5c0d6ab661ef193aa9ed9bf31f5cde85
parent3026218eaa0d3be59a898939da5126ca03bc5969 (diff)
add title
-rw-r--r--swt.c13
-rw-r--r--term.c4
2 files changed, 4 insertions, 13 deletions
diff --git a/swt.c b/swt.c
index 9c05200..b9cc631 100644
--- a/swt.c
+++ b/swt.c
@@ -142,18 +142,16 @@ static char **opt_cmd = 0;
/* function implementation */
void wbell() {
- fprintf(stderr, "BELL\n");
+ /* TODO */
}
void wclipcopy() {
- fprintf(stderr, "CLIPCOPY\n");
+ /* TODO */
}
void wdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) {
- fprintf(stderr, "DRAW CURSOR: cx: %i, cy: %i, ox: %i, oy: %i\n", cx, cy, ox, oy);
-
draw_rect(
win.canvas,
ox * win.fontcache->box.width,
@@ -183,7 +181,6 @@ void wdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og) {
void wdrawline(Line line, int x1, int y1, int x2) {
int x;
- fprintf(stderr, "DRAW LINE: x1: %i, y1: %i, x2: %i\n");
draw_rect(
win.canvas,
@@ -194,7 +191,6 @@ void wdrawline(Line line, int x1, int y1, int x2) {
0
);
- fprintf(stderr, " line: ");
for (x = x1; x < x2; x++) {
draw_char(
win.canvas,
@@ -209,7 +205,7 @@ void wdrawline(Line line, int x1, int y1, int x2) {
void wfinishdraw() {
- fprintf(stderr, "FINISH DRAW\n");
+ commit_surface();
}
@@ -236,7 +232,7 @@ void wseticontitle(char *title) {
void wsettitle(char *title) {
- fprintf(stderr, "SET TITLE: %s\n", title);
+ xdg_toplevel_set_title(win.surface.toplevel, title);
}
@@ -590,7 +586,6 @@ void run()
if (redraw) {
draw();
- commit_surface();
}
}
}
diff --git a/term.c b/term.c
index 71769a3..f35756a 100644
--- a/term.c
+++ b/term.c
@@ -834,17 +834,14 @@ ttywrite(const char *s, size_t n, int may_echo)
{
const char *next;
- fprintf(stderr, "1\n");
if (may_echo && IS_SET(MODE_ECHO))
twrite(s, n, 1);
- fprintf(stderr, "2\n");
if (!IS_SET(MODE_CRLF)) {
ttywriteraw(s, n);
return;
}
- fprintf(stderr, "3\n");
/* This is similar to how the kernel handles ONLCR for ttys */
while (n > 0) {
if (*s == '\r') {
@@ -858,7 +855,6 @@ ttywrite(const char *s, size_t n, int may_echo)
n -= next - s;
s = next;
}
- fprintf(stderr, "4\n");
}
void