Opps missed the list.

On 12/3/06, Mike Emmel <[EMAIL PROTECTED]> wrote:
> I  think you may be triggering a bug where a extra flip is still occuring.
> I tried to remove all flips but the one during repaint.
>
> Can you file a bug  on the gtk bug list. And attach your program.
>
> Can't tell you when I can get to it. If you want to chase it yourself
> then backtrace from
> IDirectFBSurface_Window_Flip.
>
> The only place we should flip now is in.
>
> impl->surface->Flip(impl->surface, &reg,0); gdkwindow-directfb.c :2975
>
> The other two flips are in gdkgeometry-directfb.c scrolling code those
> may not be correct.
>
> So in the CVS source in  my opinion flicker by a early flip is
> unlikley since I think I fixed all of these.
>
> Now the other problem is the window paint thread may not be the same
> thread that we are running the gdk event loop on. I don't think it is.
> Denis can correct me here.
>
> If I'm right and its not then you have no assurance on the order of
> window redraw and custom painting in the gtk thread.  Or its the call
> ordering on a single thread.
> I think this is the source of your flicker if so I don't think there
> is a fix with the current design .
>
> Denis can you correct me ?
>
>
>
> On 12/3/06, ?? <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > Hello,
> >
> >          When I switch from a window to a new one, I found by accident there
> > is obvious flickering in this process.
> >
> >          Since it only happens when showing a new window, I think it's
> > because of the DFB lower redrawing mechanism.
> >
> >          The problem can be reshown like this:
> >
> >                    There are two windows (window1, window2) which can switch
> > to each other. Window1 has an image of "gtk.gif" on it, and a button with
> > label "forward" on it, which can be triggered to switch to window2;
> >
> > Window2 has the same image of "gtk.gif" on it, and a button with label
> > "bckward" on it, which can be triggered to switch to window1. So, when
> > switching from window1 to window2, the gtk logo image flickers obviously;
> > When we switch back to the existing window1, no flickering occurs.
> >
> >          The test code is below:
> >
> >
> >
> > #include <gtk/gtk.h>
> >
> > #include <gdk/gdk.h>
> >
> > #include <gdk/gdkkeysyms.h>
> >
> > #include <stdio.h>
> >
> > #define WINDOW_ICON "gtk.gif"
> >
> > GtkWidget* window1;
> >
> > GtkWidget *window2;
> >
> > static void win_back(GtkWidget *widget, gpointer data)
> >
> > {
> >
> >          gtk_widget_hide(window2);
> >
> >          gtk_widget_show_all(window1);
> >
> >
> >
> >          return;
> >
> > }
> >
> > static void win_next(GtkWidget *widget,gpointer data)
> >
> > {
> >
> >
> >
> >          GtkWidget *table;
> >
> >          GtkWidget *button;
> >
> >          GtkAttachOptions ex,fl,exfl;
> >
> >          GtkRcStyle *rc;
> >
> >          GtkStyle   *style;
> >
> >
> >
> > #if 0  // if dont destroy the latter window (window2), no flickering will
> > appear when forwarding, because it already exist when switching.
> >
> >          if(window2)
> >
> >          {
> >
> >                    if(window1)
> >
> >                             gtk_widget_hide(window1);
> >
> >                    gtk_widget_show(window2);
> >
> >                    return;
> >
> >          }
> >
> > #endif
> >
> >
> >
> >                    window2 =
> > gtk_window_new(GTK_WINDOW_TOPLEVEL);
> >
> >          gtk_widget_set_name(window2,"window");
> >
> >          gtk_window_set_title(GTK_WINDOW(window2),"Style
> > App");
> >
> >
> > //gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
> >
> >
> > gtk_window_set_default_size(GTK_WINDOW(window2),240,320);
> >
> >
> >
> >          //-------------------------------- pack button
> > into table-----------------------
> >
> >          table = gtk_table_new(3,3,TRUE);
> >
> >          gtk_widget_set_name(table,"table");
> >
> >          gtk_widget_show(table);
> >
> >
> >
> >          exfl = (GtkAttachOptions)5;
> >
> >          ex = GTK_EXPAND;
> >
> >          fl = GTK_FILL;
> >
> >
> >
> >          button = gtk_image_new_from_file(WINDOW_ICON);
> >
> >          gtk_widget_show(button);
> >
> >          gtk_table_attach (GTK_TABLE (table),      \
> >
> >                             button, \
> >
> >                         /* X direction */          /* Y direction */ \
> >
> >                         1,2,                      1, 2,      \
> >
> >                         (GtkAttachOptions)exfl,
> > (GtkAttachOptions)exfl,         \
> >
> >                         1,                         1);
> >
> >
> >
> >          button = gtk_button_new_with_label("bckward");
> >
> >          gtk_widget_show(button);
> >
> >          gtk_widget_set_name(button,"buttonb");
> >
> >          g_signal_connect (G_OBJECT (button), "clicked",G_CALLBACK
> > (win_back), window2);
> >
> >
> >
> >          gtk_table_attach (GTK_TABLE (table),      \
> >
> >                             button, \
> >
> >                         /* X direction */          /* Y direction */ \
> >
> >                         0,1,                      0, 1,      \
> >
> >                         (GtkAttachOptions)exfl,
> > (GtkAttachOptions)exfl,         \
> >
> >                         1,                         1);
> >
> >
> >
> >          gtk_container_add(GTK_CONTAINER(window2),table);
> >
> >          gtk_widget_show(window2);
> >
> >          //gtk_widget_show_all(window);
> >
> >          return;
> >
> > }
> >
> > int main(int argc, char **argv)
> >
> > {
> >
> >          GtkWidget *table;
> >
> >          GtkWidget *button;
> >
> >          GtkAttachOptions ex,fl,exfl;
> >
> >
> >
> >          gtk_init(&argc, &argv);
> >
> >
> >
> >          window1 = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> >
> >          gtk_widget_set_name(window1,"window");
> >
> >          gtk_window_set_title(GTK_WINDOW(window1),"Style
> > App");
> >
> >
> > //gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER);
> >
> >
> > gtk_window_set_default_size(GTK_WINDOW(window1),240,320);
> >
> >
> >
> >          //-------------------------------- pack button
> > into table-----------------------
> >
> >          table = gtk_table_new(3,3,TRUE);
> >
> >          gtk_widget_set_name(table,"table");
> >
> >
> >
> >          exfl = (GtkAttachOptions)5;
> >
> >          ex = GTK_EXPAND;
> >
> >          fl = GTK_FILL;
> >
> >
> >
> >          button = gtk_image_new_from_file(WINDOW_ICON);
> >
> >          gtk_widget_set_name(button,"sbutton");
> >
> >
> >
> >          gtk_table_attach (GTK_TABLE (table),      \
> >
> >                             button, \
> >
> >                         /* X direction */          /* Y direction */ \
> >
> >                         1,2,                      1, 2,      \
> >
> >                         (GtkAttachOptions)exfl,
> > (GtkAttachOptions)exfl,         \
> >
> >                         1,                         1);
> >
> >
> >
> >          button = gtk_button_new_with_label("forward");
> >
> >          gtk_widget_set_name(button,"buttonf");
> >
> >          g_signal_connect (G_OBJECT (button), "clicked",G_CALLBACK
> > (win_next), window1);
> >
> >
> >
> >          gtk_table_attach (GTK_TABLE (table),      \
> >
> >                             button, \
> >
> >                         /* X direction */          /* Y direction */ \
> >
> >                         0,1,                      0, 1,      \
> >
> >                         (GtkAttachOptions)exfl,
> > (GtkAttachOptions)exfl,         \
> >
> >                         1,                         1);
> >
> >          gtk_container_add(GTK_CONTAINER(window1),table);
> >
> >
> >
> >          gtk_widget_show(button);
> >
> >          gtk_widget_show(table);
> >
> >          gtk_widget_show_all(window1);
> >
> >
> >
> >          gtk_main();
> >
> >
> >
> >          return 0;
> >
> > }
> >
> >          Anyone can shed some light on me? Thanx in advance.
> >
> >
> >
> >
> > ---------------------------------------
> >
> > Best Wishes!
> >
> >
> >
> > Zhang Hui
> >
> > Email: [EMAIL PROTECTED]
> >
> > Phone: 86-25-58748787-8215
> >
> > Samsung Electronics(China) R&D Center
> >
> > ---------------------------------------
> >
> >
> > _______________________________________________
> > directfb-dev mailing list
> > [email protected]
> > http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
> >
> >
> >
> >
>

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to