[hafqa] [hafqa] [Bug 3522] New: DIalog coordinates calculation issue while switching from Fullscreen to Unfullscreen mode

From: bugzilla-daemon at maemo.org bugzilla-daemon at maemo.org
Date: Thu Jul 31 07:36:05 EEST 2008
https://bugs.maemo.org/show_bug.cgi?id=3522

           Summary: DIalog coordinates calculation issue while switching
                    from Fullscreen to Unfullscreen mode
           Product: System software
           Version: 2.0
          Platform: ARM
        OS/Version: Debian
            Status: UNCONFIRMED
          Severity: major
          Priority: Medium
         Component: gtk
        AssignedTo: nobody at maemo.org
        ReportedBy: inderjeet.sharma at rediffmail.com
         QAContact: gtk-bugs at maemo.org


SOFTWARE VERSION:gtk 2.0
(Control Panel > General > About product)

STEPS TO REPRODUCE THE PROBLEM: Please compile and run the program below:
#include <gtk/gtk.h>
#include <gtk/gtkmain.h>
#include <hildon/hildon-program.h>
static gboolean key_event(GtkWidget * widget, GdkEventKey * event, HildonWindow
* window);
void response(GtkDialog *dialog, gint response, gpointer user_data);
static void display_message(GtkWidget *parent, gpointer message);
gint main( int argc, char **argv )
{
    HildonProgram  *program = NULL;
    HildonWindow   *window = NULL;
    if(!g_thread_supported())
    {
        g_thread_init (NULL);
    }
    gdk_threads_init ();
    gtk_init(&argc, &argv);
    /* Create the Hildon program and setup the title */
    program = HILDON_PROGRAM(hildon_program_get_instance());
    g_set_application_name("");
    /* Create HildonWindow and set it to HildonProgram */
    window = HILDON_WINDOW(hildon_window_new());
    hildon_program_add_window(program, window);
    gtk_window_set_title (GTK_WINDOW (window), "Dialog problem");
    gtk_widget_realize(GTK_WIDGET(window));
    g_signal_connect(G_OBJECT(window), "key_press_event",
G_CALLBACK(key_event), window);
    /* Begin the main application */
    gtk_widget_show(GTK_WIDGET(window));
    gtk_main();
    return 0;
}
void response(GtkDialog *dialog, gint response, gpointer user_data)
{
    gtk_widget_destroy (GTK_WIDGET (user_data));
    gtk_main_quit();
}
static void display_message(GtkWidget *parent, gpointer message)
{
    GtkWidget   *info_message;
    info_message = (GtkWidget *)hildon_note_new_information(GTK_WINDOW(parent),
(gchar *) message);
    g_signal_connect(info_message, "response", G_CALLBACK(response),
info_message);
    gtk_widget_show_all(GTK_WIDGET(info_message));
    return;
}
static gboolean key_event(GtkWidget * widget, GdkEventKey * event, HildonWindow
* window)
{
    static gboolean fullscreen = FALSE;
    gboolean handled = TRUE;
    switch(event->keyval)
    {
        case GDK_F6:
            if(!fullscreen)
            {
                gtk_window_fullscreen(GTK_WINDOW(window));
                fullscreen = TRUE;
            }
            else
            {
                gtk_window_unfullscreen(GTK_WINDOW(window));
                /* Sync with X11 just to ensure that window is in Unfullscreen
mode before displaying Dialog */
               
XSync(GDK_WINDOW_XDISPLAY(GDK_WINDOW(GTK_WIDGET(window)->window)), TRUE);
                /* I added above statement so that Dialog's coordinates
calculation is done when main window is in the unfullscreen mode */
                fullscreen = FALSE;
                display_message(GTK_WIDGET(window), "Dialog at wrong
coordinates.");
                /* Actaul : Dialog coordinates are calculated according to the
Fullscreen mode but displayed w.r.t
                 * any mode(Fullscreen or Unfullscreen), however actual window
is in Unfullscreen mode */
                /* Expected : Dialog coordinates should be calculated according
to the Unfullscreen mode and should be displayed w.r.t 
                 * Unfullscreen mode , however actual window is in Unfullscreen
mode */
            }
        default:
            handled = FALSE;
    }
    return handled;
}


EXPECTED OUTCOME:
Dialog coordinates should be calculated according to the Unfullscreen mode and
should be displayed w.r.t Unfullscreen mode as actual window is in this mode
only.

ACTUAL OUTCOME:
Dialog coordinates are calculated according to the Fullscreen mode but
displayed w.r.t any mode(Fullscreen or Unfullscreen), however actual window is
in Unfullscreen mode.

REPRODUCIBILITY: always
(always/sometimes/once)

EXTRA SOFTWARE INSTALLED:

OTHER COMMENTS:

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET
CLR 2.0.50727)


-- 
Configure bugmail: https://bugs.maemo.org/userprefs.cgi?tab=email
Replies to this email are NOT read, instead please add comments at
https://bugs.maemo.org/show_bug.cgi?id=3522
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the hafqa mailing list