Re: g_idle_add source & memory leaks

2011-05-10 Thread Olivier Sessink

On 05/09/2011 01:36 PM, Gabriele Greco wrote:

just a note on your example code: use the GPOINTER_TO_INT and 
GINT_TO_POINTER macro's to avoid 64bit portability problems:


gboolean mycbk(gpointer data)
{
  gint val = GPOINTER_TO_INT(data);
  char buffer[16];
  sprintf(buffer, "%09d", val);
  gtk_label_set_text(l, buffer);
  return FALSE;
}


void threadfunc(void *unused) {
  gint msec = 0;
  while (1) {
  msec++;
  g_usleep(1000);
  g_idle_add((GSourceFunc)mycbk, GINT_TO_POINTER(msec));
  }
}


Olivier
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Maximize on Windows 7 seems broken.

2011-05-10 Thread James Steward

On 11/05/2011 8:19 AM, Matteo Landi wrote:

On Wed, May 11, 2011 at 12:07 AM, James Steward
  wrote:

Hi,

I'm developing on Windows 7, 64 bit, using MinGW/MSYS for familiarity
with a Posix type system.

I have installed gtk+-bundle_2.22.1-20101227_win32.zip, and building a 32bit
app for compatibility.

My application calls gtk_window_maximize(GTK_WINDOW(window)); but the
resulting window is not maximized properly. It sits below the top of
the screen, and is cut off at the bottom of the screen.

Also, restoring the window, then dragging to the top of the screen to
allow Bill to maximize it results in the same.

Running on an XP machine, the maximize works fine, as it does on Linux.

Is this a known Windows 7 (possibly also Vista) problem with GTK+ apps?
Is there a fix?

I've googled around, but not hit on any solutions yet.

Is it maybe a problem with the window manager? I had problem trying to
raise a window up if covered.
Just guessing...


Whether a problem with Bill's window manager or not, there must be a 
solution from Gtk.


JS.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Maximize on Windows 7 seems broken.

2011-05-10 Thread Matteo Landi
Is it maybe a problem with the window manager? I had problem trying to
raise a window up if covered.
Just guessing...

Regards,
Matteo

On Wed, May 11, 2011 at 12:07 AM, James Steward
 wrote:
> Hi,
>
> I'm developing on Windows 7, 64 bit, using MinGW/MSYS for familiarity
> with a Posix type system.
>
> I have installed gtk+-bundle_2.22.1-20101227_win32.zip, and building a 32bit
> app for compatibility.
>
> My application calls gtk_window_maximize(GTK_WINDOW(window)); but the
> resulting window is not maximized properly. It sits below the top of
> the screen, and is cut off at the bottom of the screen.
>
> Also, restoring the window, then dragging to the top of the screen to
> allow Bill to maximize it results in the same.
>
> Running on an XP machine, the maximize works fine, as it does on Linux.
>
> Is this a known Windows 7 (possibly also Vista) problem with GTK+ apps?
> Is there a fix?
>
> I've googled around, but not hit on any solutions yet.
>
> James.
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>



-- 
http://www.matteolandi.net/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Maximize on Windows 7 seems broken.

2011-05-10 Thread James Steward

Hi,

I'm developing on Windows 7, 64 bit, using MinGW/MSYS for familiarity
with a Posix type system.

I have installed gtk+-bundle_2.22.1-20101227_win32.zip, and building a 
32bit app for compatibility.


My application calls gtk_window_maximize(GTK_WINDOW(window)); but the
resulting window is not maximized properly. It sits below the top of
the screen, and is cut off at the bottom of the screen.

Also, restoring the window, then dragging to the top of the screen to
allow Bill to maximize it results in the same.

Running on an XP machine, the maximize works fine, as it does on Linux.

Is this a known Windows 7 (possibly also Vista) problem with GTK+ apps?
Is there a fix?

I've googled around, but not hit on any solutions yet.

James.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


When drag scroll, page content show incorrectly

2011-05-10 Thread Corey Fu
I use gtk+-2.16.6 and compiled with configure:

--with-gdktarget=directfb \

--without-libtiff \

--with-libjasper \

--with-included-loaders=jpeg,png,jasper \

--disable-glibtest \

--disable-modules


I run the gtk-demo and choose "Source" option, then click the page down
button to scroll the window, the most part of text content is turned to a
black block one, as the attachment show!  I  find that in the process of
scrolling, function _gdk_directfb_window_scroll is called. While my another
application called _gdk_directfb_window_move_region, it has the
same issue: the most part of content is turned to a black block. Is this a
GTK bug or DFB bug? How can I fix it?


Thanks!
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list