aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/main.c b/main.c
index a49603e..49639a1 100644
--- a/main.c
+++ b/main.c
@@ -1,12 +1,13 @@
1#include <X11/Xlib.h>
2#include <X11/Xutil.h>
3#include <X11/extensions/Xfixes.h>
4#include <X11/keysym.h>
5#include <stdio.h> 1#include <stdio.h>
6#include <stdlib.h> 2#include <stdlib.h>
7#include <unistd.h> 3#include <unistd.h>
8#include <getopt.h> 4#include <getopt.h>
9 5
6#include <X11/Xlib.h>
7#include <X11/Xutil.h>
8#include <X11/extensions/Xfixes.h>
9#include <X11/keysym.h>
10
10#define DEFAULT_ZOOM_LEVEL 2 11#define DEFAULT_ZOOM_LEVEL 2
11#define DEFAULT_WINDOW_SIZE 600 12#define DEFAULT_WINDOW_SIZE 600
12 13
@@ -88,6 +89,12 @@ void create_zoom_window() {
88 WhitePixel(display, screen) 89 WhitePixel(display, screen)
89 ); 90 );
90 XStoreName(display, zoom_window, "Xmagnify"); 91 XStoreName(display, zoom_window, "Xmagnify");
92
93 XClassHint class_hint;
94 class_hint.res_name = "xmagnify";
95 class_hint.res_class = "Xmagnify";
96 XSetClassHint(display, zoom_window, &class_hint);
97
91 XSelectInput(display, zoom_window, KeyPressMask); 98 XSelectInput(display, zoom_window, KeyPressMask);
92 XMapWindow(display, zoom_window); 99 XMapWindow(display, zoom_window);
93} 100}