public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug AWT/16771] New: Can't change location while the component is hidden
@ 2004-07-27  1:16 gcc-bugzilla at gcc dot gnu dot org
  2004-07-27  1:17 ` [Bug AWT/16771] " fitzsim at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-07-27  1:16 UTC (permalink / raw)
  To: gcc-bugs

When component is hidden, you can't change it's location.  If you
change the location while it is hidden, and then show the component,
the component will return to its last position before being hidden.

I'm attaching a test case which demonstrates this bug.

To reproduce:
1. compile the test program and run it
2. move the component somewhere in the middle of the screen
3. click on Hide Me

Expected results:
The component will be hidden for a brief second and then will be shown
again at position (100,100).

Actual results:
The component does not show up at (100,100), but it shows up at where
it was last positioned before you pressed Hide Me.

More details:
Upon inspection, it seems that the top-level Window's heavyweight
peer's location is not changed when you call setLocation() while the
it is hidden.  The reason the window is returned to its original
position is because AWT receives a GTK_CONFIGURE signal, telling it
that the component is shown at a certain position.  This results in a
call to setBoundsCallback() in Window class, which changes the Java
Window's position to match the heavyweight peer's position.
------- Additional Comments From djee at redhat dot com  2004-02-17 16:57 -------
Created an attachment (id=97769)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=97769&action=view)
test case

------- Additional Comments From fitzsim at redhat dot com  2004-02-17 17:07 -------
You may need to place the window manually.  See
GtkWindowPeer.setResizable for an example.  I couldn't figure out how
to prevent the window position from being discarded, so I just hacked
in some "re-placement" code.

I think the problem is that GTK discards position information when
GObject properties are modified.  This may be a GTK bug, but I'm not
sure.  Since Components are shown and hidden using a GObject property,
I'm starting to think this is a general problem that needs to be more
carefully examined.

------- Additional Comments From djee at redhat dot com  2004-02-24 11:59 -------
This could be a window manager issue.  When you explicitly request a
relocation of a top-level window, the window manager doesn't always
honour your request, and it may use its own window placement policy
instead.  I looked through the gtk and gdk API, but there doesn't seem
to be anything that'll allow you to force the position of a window.
------- Additional Comments From fitzsim at redhat dot com  2004-05-18 16:55 -------
Fixed on java-gui-branch.  From GtkWindowPeer.nativeSetBounds:


  gtk_window_move (GTK_WINDOW(ptr), x, y);
  /* The call to gdk_window_move is needed in addition to the call to
     gtk_window_move.  If gdk_window_move isn't called, then the
     following set of operations doesn't give the expected results:

     1. show a window
     2. manually move it to another position on the screen
     3. hide the window
     4. reposition the window with Component.setLocation
     5. show the window

     Instead of being at the position set by setLocation, the window
     is reshown at the position to which it was moved manually. */
  gdk_window_move (GTK_WIDGET (ptr)->window, x, y);


-- 
           Summary: Can't change location while the component is hidden
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P1
         Component: AWT
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: djee at redhat dot com
                CC: djee at redhat dot com,gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16771


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug AWT/16771] Can't change location while the component is hidden
  2004-07-27  1:16 [Bug AWT/16771] New: Can't change location while the component is hidden gcc-bugzilla at gcc dot gnu dot org
@ 2004-07-27  1:17 ` fitzsim at redhat dot com
  2004-07-27  1:21 ` fitzsim at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: fitzsim at redhat dot com @ 2004-07-27  1:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fitzsim at redhat dot com  2004-07-27 01:15 -------
Created an attachment (id=6837)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6837&action=view)
test case

reattach test case

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16771


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug AWT/16771] Can't change location while the component is hidden
  2004-07-27  1:16 [Bug AWT/16771] New: Can't change location while the component is hidden gcc-bugzilla at gcc dot gnu dot org
  2004-07-27  1:17 ` [Bug AWT/16771] " fitzsim at redhat dot com
@ 2004-07-27  1:21 ` fitzsim at redhat dot com
  2004-07-27  2:10 ` fitzsim at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: fitzsim at redhat dot com @ 2004-07-27  1:21 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal
           Priority|P1                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16771


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug AWT/16771] Can't change location while the component is hidden
  2004-07-27  1:16 [Bug AWT/16771] New: Can't change location while the component is hidden gcc-bugzilla at gcc dot gnu dot org
  2004-07-27  1:17 ` [Bug AWT/16771] " fitzsim at redhat dot com
  2004-07-27  1:21 ` fitzsim at redhat dot com
@ 2004-07-27  2:10 ` fitzsim at redhat dot com
  2004-07-27  2:11 ` fitzsim at redhat dot com
  2004-07-30 19:44 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: fitzsim at redhat dot com @ 2004-07-27  2:10 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fitzsim at redhat dot com
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-27 02:07:35
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16771


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug AWT/16771] Can't change location while the component is hidden
  2004-07-27  1:16 [Bug AWT/16771] New: Can't change location while the component is hidden gcc-bugzilla at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-07-27  2:10 ` fitzsim at redhat dot com
@ 2004-07-27  2:11 ` fitzsim at redhat dot com
  2004-07-30 19:44 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: fitzsim at redhat dot com @ 2004-07-27  2:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fitzsim at redhat dot com  2004-07-27 02:08 -------
Fixed.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16771


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug AWT/16771] Can't change location while the component is hidden
  2004-07-27  1:16 [Bug AWT/16771] New: Can't change location while the component is hidden gcc-bugzilla at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-07-27  2:11 ` fitzsim at redhat dot com
@ 2004-07-30 19:44 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-30 19:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16771


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug awt/16771] Can't change location while the component is hidden
       [not found] <bug-16771-8724@http.gcc.gnu.org/bugzilla/>
@ 2005-10-16  1:57 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-16  1:57 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.0                       |pre-0.18


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16771


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-10-16  1:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-27  1:16 [Bug AWT/16771] New: Can't change location while the component is hidden gcc-bugzilla at gcc dot gnu dot org
2004-07-27  1:17 ` [Bug AWT/16771] " fitzsim at redhat dot com
2004-07-27  1:21 ` fitzsim at redhat dot com
2004-07-27  2:10 ` fitzsim at redhat dot com
2004-07-27  2:11 ` fitzsim at redhat dot com
2004-07-30 19:44 ` pinskia at gcc dot gnu dot org
     [not found] <bug-16771-8724@http.gcc.gnu.org/bugzilla/>
2005-10-16  1:57 ` [Bug awt/16771] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).