[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] RFC: GtkWindowPeer fix
From: |
Roman Kennke |
Subject: |
[cp-patches] RFC: GtkWindowPeer fix |
Date: |
Wed, 20 Apr 2005 22:06:04 +0200 |
Hi,
I have found a nasty problem, that is visible when using the pack()
method on frames. The problem is that before a window is opened, the
insets of the window are (0,0,0,0) because the window decorations are
not yet known about (I guess). However, after a window is up, the insets
are correctly set to some sane value like (23, 5, 5, 5). The problem is
that pack() sets the window size to the preferred size of the contained
components and is usually called _before_ a window is opened. This
messes up the layout and pack() has not the desired effect. I hope my
explanations are not too confusing ;-) If you want to see what I mean,
start the Swing example and open one of the dialogs by pushing the
buttons. Do this before and after applying my patch.
The attached patch fixes this by resizing the window by the insets of
the window decorations immediatly after the window is opened. Here this
works pretty good, but since I'm not very familiar with the GTK code I
think I ask better if I should commit this as it is, or if this can be
made better.
2005-04-20 Roman Kennke <address@hidden>
* gnu/java/awt/peer/gtk/GtkWindowPeer.java
(postWindowEvent): Resize window after opening to take the
window decoration insets into account.
/Roman
GtkWindowPeer.diff
Description: Text Data
- [cp-patches] RFC: GtkWindowPeer fix,
Roman Kennke <=