Public bug reported: Binary package hint: compiz
I'm using Ubuntu 8.10 with extra visual effects, and "Place Windows" setting is checked in compizconfig setting manager. I notice top-level window will be moved to other workspace by gdk_window_show/gdk_window_raise/gdk_window_deiconify if the window is partly out of the workspace. If I unchecked "Place Windows" in compizconfig setting manager, the window will not be moved by above function call. The description of "Place Windows" is: Place windows at appropriate positions when mapped. Since the window has been mapped, why move it again? The sample code is below. When GDK_BUTTON_PRESS is received, gdk_window_show will be called. Steps to reproduce the bug: 1. move the window partly out of the workspace 2. click it(not titlebar) bug: the window is moved to another workspace. ===================================================== #include <gtk/gtk.h> #include <gdk/gdkwindow.h> #include <gdk/gdkx.h> static void my_gdk_event_handler(GdkEvent* event, gpointer data) { GdkWindow* window = event->any.window; if (event->type == GDK_DELETE) { gdk_window_destroy(window); } if (event->type == GDK_BUTTON_PRESS) { // call something when GDK_BUTTON_PRESS is received gdk_window_show(window); //gdk_window_raise(window); } } int main(int argc, char* argv[]) { GMainContext* context; gdk_init(&argc, &argv); context = g_main_context_default(); // Create the window window GdkWindowAttr attr; attr.window_type = GDK_WINDOW_TOPLEVEL; attr.title = "PlaceWindowTest"; attr.x = 30; attr.y = 30; attr.width = 300; attr.height = 300; attr.wclass = GDK_INPUT_OUTPUT; attr.event_mask = GDK_ALL_EVENTS_MASK; GdkWindow* window = gdk_window_new(NULL, &attr, GDK_WA_X | GDK_WA_Y); GdkColor c = { 0, 65535, 65535, 65535 }; gdk_window_set_background(window, &c); gdk_window_show(window); gdk_event_handler_set(my_gdk_event_handler, NULL, NULL); while (1) { while (gdk_events_pending()) { g_main_context_iteration( context, TRUE); } if (GDK_WINDOW_DESTROYED(window)) { break; } } return 0; } ==================================================================== ** Affects: compiz (Ubuntu) Importance: Undecided Status: New -- Window partly out of a workspace will be moved by some gdk function calls if "Place Windows" is checked in compizconfig https://bugs.launchpad.net/bugs/415753 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs