Compare commits

...

6 Commits

Author SHA1 Message Date
Matthias Clasen
4405461c76 Fix size allocation with custom titlebars
Even without full csd, we need to take a custom titlebar into
account when translating between content and frame size.
2013-07-06 23:12:12 -04:00
Matthias Clasen
60cfe0114d csd: Fix titlebar clicks
The determination of clicks in the titlebar area was not updated
to work for titlebars that are part of the frame_window instead
of the content window.
2013-07-06 23:12:11 -04:00
Matthias Clasen
1757c13838 csd: Fix gtk_window_get_remembered_size to never grow
gtk_window_get_remembered_size returns a size for the content
area, to which we then add the frame size to get the new size
for the frame window. To avoid accidentally growing the window,
return a remembered size that comes from subtracting the frame
size from the frame_window size.
2013-07-06 23:12:11 -04:00
Matthias Clasen
32292d6eff csd: Fix interaction of fullscreen with custom titlebars 2013-07-06 23:12:11 -04:00
Matthias Clasen
91df973558 Make gtk_container_propagate_draw work with frame window
gtk_container_propagate_draw was not working correctly in this
situation, since it was assuming that the child window is a
descendent of gtk_widget_get_window (container). As a consequence,
we were first adding the toplevel position to the offset, and
then resetting the offset to zero, both of which are not correct.
To fix this, exit the loop when we are hitting a toplevel window.
2013-07-06 23:12:11 -04:00
Matthias Clasen
00fd102417 csd: add a frame window
To improve the compatibility of client-side decorations with
traditional decorations, we introduce a frame window, which is
the actual toplevel. widget->window for the GtkWindow is a child
of this window, and just as with traditional window decorations,
corresponds to the window content.

All sizes (default size, size allocation, parameters given
to gtk_window_resize, etc) refer to the size of the content.

The resize handle windows and the titlebar widgets are children
of the frame window.
2013-07-06 23:12:11 -04:00
2 changed files with 430 additions and 502 deletions

View File

@@ -3478,6 +3478,11 @@ gtk_container_propagate_draw (GtkContainer *container,
for (w = gtk_widget_get_window (child); w && w != window; w = gdk_window_get_parent (w))
{
int wx, wy;
if (gdk_window_get_window_type (w) == GDK_WINDOW_TOPLEVEL ||
gdk_window_get_window_type (w) == GDK_WINDOW_TEMP)
break;
gdk_window_get_position (w, &wx, &wy);
x += wx;
y += wy;

File diff suppressed because it is too large Load Diff