updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / uzbl-dfb-git / gtk2-dfb.patch
blob7898bb0108c1839090292ed4099602f85658cdd3
1 diff --git a/src/callbacks.c b/src/callbacks.c
2 index d2352b2..137bb31 100644
3 --- a/src/callbacks.c
4 +++ b/src/callbacks.c
5 @@ -64,11 +64,11 @@ cmd_set_geometry() {
6 gtk_window_maximize((GtkWindow *)(uzbl.gui.main_window));
7 } else {
8 /* we used to use gtk_window_parse_geometry() but that didn't work how it was supposed to */
9 - ret = XParseGeometry(uzbl.gui.geometry, &x, &y, &w, &h);
10 - if(ret & XValue)
11 - gtk_window_move((GtkWindow *)uzbl.gui.main_window, x, y);
12 - if(ret & WidthValue)
13 - gtk_window_resize((GtkWindow *)uzbl.gui.main_window, w, h);
14 + //ret = XParseGeometry(uzbl.gui.geometry, &x, &y, &w, &h);
15 + //if(ret & XValue)
16 + // gtk_window_move((GtkWindow *)uzbl.gui.main_window, x, y);
17 + //if(ret & WidthValue)
18 + // gtk_window_resize((GtkWindow *)uzbl.gui.main_window, w, h);
22 diff --git a/src/uzbl-core.c b/src/uzbl-core.c
23 index 227e8c6..89178cb 100644
24 --- a/src/uzbl-core.c
25 +++ b/src/uzbl-core.c
26 @@ -1272,14 +1272,14 @@ run_command (const gchar *command, const guint npre, const gchar **args,
28 GArray *a = g_array_new (TRUE, FALSE, sizeof(gchar*));
29 gchar *pid = itos(getpid());
30 - gchar *xwin = itos(uzbl.xwin);
31 + //gchar *xwin = itos(uzbl.xwin);
32 guint i;
33 sharg_append(a, command);
34 for (i = 0; i < npre; i++) /* add n args before the default vars */
35 sharg_append(a, args[i]);
36 sharg_append(a, uzbl.state.config_file);
37 sharg_append(a, pid);
38 - sharg_append(a, xwin);
39 + sharg_append(a, "0");
40 sharg_append(a, uzbl.comm.fifo_path);
41 sharg_append(a, uzbl.comm.socket_path);
42 sharg_append(a, uzbl.state.uri);
43 @@ -1317,7 +1317,7 @@ run_command (const gchar *command, const guint npre, const gchar **args,
44 g_error_free (err);
46 g_free (pid);
47 - g_free (xwin);
48 + //g_free (xwin);
49 g_array_free (a, TRUE);
50 return result;
52 @@ -2612,12 +2612,12 @@ main (int argc, char* argv[]) {
53 struct timeval tv;
54 gettimeofday(&tv, NULL);
55 srand((unsigned int)tv.tv_sec*tv.tv_usec);
56 - uzbl.xwin = rand();
57 + //uzbl.xwin = rand();
58 } else {
59 uzbl.gui.main_window = create_window ();
60 gtk_container_add (GTK_CONTAINER (uzbl.gui.main_window), uzbl.gui.vbox);
61 gtk_widget_show_all (uzbl.gui.main_window);
62 - uzbl.xwin = GDK_WINDOW_XID (GTK_WIDGET (uzbl.gui.main_window)->window);
63 + //uzbl.xwin = GDK_WINDOW_XID (GTK_WIDGET (uzbl.gui.main_window)->window);
66 uzbl.gui.scbar_v = (GtkScrollbar*) gtk_vscrollbar_new (NULL);
67 @@ -2627,7 +2627,8 @@ main (int argc, char* argv[]) {
68 gtk_widget_set_scroll_adjustments ((GtkWidget*) uzbl.gui.web_view, uzbl.gui.bar_h, uzbl.gui.bar_v);
70 if(!uzbl.state.instance_name)
71 - uzbl.state.instance_name = itos((int)uzbl.xwin);
72 + uzbl.state.instance_name = "0";
73 + // uzbl.state.instance_name = itos((int)uzbl.xwin);
75 GString *tmp = g_string_new("");
76 g_string_printf(tmp, "%d", getpid());
77 @@ -2651,7 +2652,8 @@ main (int argc, char* argv[]) {
78 if (uzbl.state.socket_id)
79 printf("plug_id %i\n", gtk_plug_get_id(uzbl.gui.plug));
80 else
81 - printf("window_id %i\n",(int) uzbl.xwin);
82 + //printf("window_id %i\n",(int) uzbl.xwin);
83 + printf("window_id N/A (directfb)\n");
84 printf("pid %i\n", getpid ());
85 printf("name: %s\n", uzbl.state.instance_name);
86 printf("commit: %s\n", uzbl.info.commit);
87 diff --git a/src/uzbl-core.h b/src/uzbl-core.h
88 index 5760423..ab8630c 100644
89 --- a/src/uzbl-core.h
90 +++ b/src/uzbl-core.h
91 @@ -14,8 +14,8 @@
93 #include <glib/gstdio.h>
94 #include <gtk/gtk.h>
95 -#include <gdk/gdkx.h>
96 -#include <gdk/gdkkeysyms.h>
97 +//#include <gdk/gdkx.h>
98 +//#include <gdk/gdkkeysyms.h>
99 #include <sys/socket.h>
100 #include <sys/stat.h>
101 #include <sys/types.h>
102 @@ -196,7 +196,7 @@ typedef struct {
103 Javascript js;
104 Info info;
106 - Window xwin;
107 +// Window xwin;
108 } UzblCore;
110 /* Main Uzbl object */