Re: Help replacing GtkDrawingArea with GtkLayout
On Sun, 2014-03-09 at 14:03 +, Richard Shann wrote: From: Jo?l Kr?hemann j...@weedlight.ch To: gtk-app-devel-list@gnome.org Subject: Re: Help replacing GtkDrawingArea with GtkLayout Message-ID: 1394327737.3369.3.camel@debian Content-Type: text/plain; charset=us-ascii Hi, Didn't before but may be check the following: g_object_set(G_OBJECT(layout), app-paintable\0, TRUE, NULL); Hmm, I hadn't noticed that property. It is presumably set ok since I can draw and place widgets on the GtkLayout. It was the configure and scroll events that I didn't receive. BTW why do you have two NULL bytes at the end of the property name (AFAIK only one is needed)? Richard Assumed you get annoyed by warnings, you can slightly disable it. It's distribution depend what flags are per default on. For further reading: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html regards Joël ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Help replacing GtkDrawingArea with GtkLayout
On Mon, 2014-03-10 at 09:26 +0100, Joël Krähemann wrote: On Sun, 2014-03-09 at 14:03 +, Richard Shann wrote: From: Jo?l Kr?hemann j...@weedlight.ch To: gtk-app-devel-list@gnome.org Subject: Re: Help replacing GtkDrawingArea with GtkLayout Message-ID: 1394327737.3369.3.camel@debian Content-Type: text/plain; charset=us-ascii Hi, Didn't before but may be check the following: g_object_set(G_OBJECT(layout), app-paintable\0, TRUE, NULL); Hmm, I hadn't noticed that property. It is presumably set ok since I can draw and place widgets on the GtkLayout. It was the configure and scroll events that I didn't receive. BTW why do you have two NULL bytes at the end of the property name (AFAIK only one is needed)? Richard Assumed you get annoyed by warnings, you can slightly disable it. It's distribution depend what flags are per default on. For further reading: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html regards Joël ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list You should ask why I forget to add GDK_SCROLL_MASK gtk_widget_set_events (GTK_WIDGET (layout), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_SCROLL_MASK ); then you have to g_signal_connect(G_OBJECT(layout), scroll-event\0, G_CALLBACK(layout_callback), NULL); gboolean layout_callback(GtkWidget *widget, GdkEvent *event, gpointer user_data) { /* do your thing */ return(FALSE); } ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GTK signals question.
Do you have an other thread? May be concurrency problems? On Wed, 2014-03-05 at 01:43 -0500, Chris Moller wrote: Okay, I'm out of ideas... I'm writing an app, that among a lot of other stuff, has three mutually interacting spinbuttuns, i.e., if I increment spinbutton A, its callback then updates values in B and C. B and then would try to update A, and C, etc., resulting in a bottomless recursion. So, what I need to do is, while I'm in A's callback, block the B and C callbacks; while in in B, block A and C and so on. Every combination of g_signal_handler_block(), g_signal_handlers_block_matched(), etc, I've tried just results in seg faults--all that stuff works fine outside the callbacks, but the moment I stick them in a callback, death happens. Any suggestions? Thanks. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Help replacing GtkDrawingArea with GtkLayout
On Mon, 2014-03-10 at 09:29 +0100, Joël Krähemann wrote: On Mon, 2014-03-10 at 09:26 +0100, Joël Krähemann wrote: On Sun, 2014-03-09 at 14:03 +, Richard Shann wrote: From: Jo?l Kr?hemann j...@weedlight.ch To: gtk-app-devel-list@gnome.org Subject: Re: Help replacing GtkDrawingArea with GtkLayout Message-ID: 1394327737.3369.3.camel@debian Content-Type: text/plain; charset=us-ascii Hi, Didn't before but may be check the following: g_object_set(G_OBJECT(layout), app-paintable\0, TRUE, NULL); Hmm, I hadn't noticed that property. It is presumably set ok since I can draw and place widgets on the GtkLayout. It was the configure and scroll events that I didn't receive. BTW why do you have two NULL bytes at the end of the property name (AFAIK only one is needed)? Richard Assumed you get annoyed by warnings, you can slightly disable it. It's distribution depend what flags are per default on. For further reading: http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html regards Joël ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list You should ask why I forget to add GDK_SCROLL_MASK Well, I didn't ask because I already tried it. The GtkLayout didn't receive that nor the configure signal even with setting GDK_ALL_EVENTS_MASK. What *did* work is receiving the events on the parent. But I am still curious why you have two NULL bytes termination your signal name strings, the extra one must surely get ignored... Richard gtk_widget_set_events (GTK_WIDGET (layout), GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_SCROLL_MASK ); then you have to g_signal_connect(G_OBJECT(layout), scroll-event\0, G_CALLBACK(layout_callback), NULL); gboolean layout_callback(GtkWidget *widget, GdkEvent *event, gpointer user_data) { /* do your thing */ return(FALSE); } ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
debugging broadway
hi, I wanted to see the broadway backend in action. Using gtk+3.8 I run broadwayd --address=ipaddr --port=8080 :5 and BROADWAY_DISPLAY=:5 GDK_BACKEND=broadway ./my-gtk3-app On the browser side, all I get is a blank window with a title containing broadway 2.0. Tested with chrome 33.0 and firefox 27.0. Firefox has this in the firebug console: NetworkError: 404 File not found - http://xxx:8084/socket-test; socket-test Firefox can't establish a connection to the server at ws://xxx:8084/socket-test. ws = new WebSocket(loc, broadway); broadway.js (line 2625) NetworkError: 400 Bad websocket request - http://xxx:8084/socket-bin; socket-bin Firefox can't establish a connection to the server at ws://xxx:8084/socket-bin. ws = new WebSocket(loc, broadway); Chrome shows: WebSocket connection to 'ws://xxx:8084/socket-test' failed: Error during WebSocket handshake: Unexpected response code: 404 broadway.js:2625 WebSocket connection to 'ws://xxx:8084/socket-bin' failed: Error during WebSocket handshake: Unexpected response code: 400 broadway.js:2625 'KeyboardEvent.keyLocation'' is deprecated. Please use 'KeyboardEvent.location' instead. event.returnValue is deprecated. Please use the standard event.preventDefault() instead. According to http://websocketstest.com/ both browsers have full websocket support. Any ideas? Stefan ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: debugging broadway
On mån, 2014-03-10 at 15:14 +0100, Stefan Sauer wrote: hi, I wanted to see the broadway backend in action. Using gtk+3.8 I run broadwayd --address=ipaddr --port=8080 :5 and This has 8080 BROADWAY_DISPLAY=:5 GDK_BACKEND=broadway ./my-gtk3-app On the browser side, all I get is a blank window with a title containing broadway 2.0. Tested with chrome 33.0 and firefox 27.0. Firefox has this in the firebug console: NetworkError: 404 File not found - http://xxx:8084/socket-test; socket-test This has 8084 Cut and paste error? ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: debugging broadway
On 03/10/2014 09:07 PM, Alexander Larsson wrote: On mån, 2014-03-10 at 15:14 +0100, Stefan Sauer wrote: hi, I wanted to see the broadway backend in action. Using gtk+3.8 I run broadwayd --address=ipaddr --port=8080 :5 and This has 8080 BROADWAY_DISPLAY=:5 GDK_BACKEND=broadway ./my-gtk3-app On the browser side, all I get is a blank window with a title containing broadway 2.0. Tested with chrome 33.0 and firefox 27.0. Firefox has this in the firebug console: NetworkError: 404 File not found - http://xxx:8084/socket-test; socket-test This has 8084 Cut and paste error? Yes :/ I'ved played a bit with the js debugger in the browers but still not success. Is there any order for launching stuff? Like 1) broadwayd, 2) connect from browser, 3) launch gtk-app? Also, there is a keyboard handler handleCommands() on the js side. But pressing keys in the browser window seem to not show any effect. When I set a breakpoint on handleCommands() its not called, which makes me thing that the handler is not active. Stefan ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list