diff options
author | Havoc Pennington <hp@redhat.com> | 2002-08-24 21:28:02 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-08-24 21:28:02 +0000 |
commit | cbb4a91113734a5c743183207d76c0901bcbe7cd (patch) | |
tree | 283a0ff3e36fd9575e0194c1a7dc3fba89b2aef7 | |
parent | b9002db37faf078b2b4ea6c81cedd6fa3b3f5c34 (diff) | |
download | metacity-cbb4a91113734a5c743183207d76c0901bcbe7cd.tar.gz metacity-cbb4a91113734a5c743183207d76c0901bcbe7cd.tar.bz2 |
hack around bug in kmail etc. where SM_CLIENT_ID was set on the window,
2002-08-24 Havoc Pennington <hp@redhat.com>
* src/window.c (update_sm_hints): hack around bug in kmail etc.
where SM_CLIENT_ID was set on the window, not the client leader.
* src/theme.c (meta_frame_layout_calc_geometry): don't round
corners unless we have enough frame to chop off.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/theme.c | 27 | ||||
-rw-r--r-- | src/window.c | 33 |
3 files changed, 58 insertions, 10 deletions
@@ -1,5 +1,13 @@ 2002-08-24 Havoc Pennington <hp@redhat.com> + * src/window.c (update_sm_hints): hack around bug in kmail etc. + where SM_CLIENT_ID was set on the window, not the client leader. + + * src/theme.c (meta_frame_layout_calc_geometry): don't round + corners unless we have enough frame to chop off. + +2002-08-24 Havoc Pennington <hp@redhat.com> + * src/util.c: translate some strings that should have been, and convert to locale encoding before printing stuff. diff --git a/src/theme.c b/src/theme.c index 34e0240..2aa8ef6 100644 --- a/src/theme.c +++ b/src/theme.c @@ -567,12 +567,29 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout, fgeom->title_rect.height = 0; } - fgeom->top_left_corner_rounded = layout->top_left_corner_rounded; - fgeom->top_right_corner_rounded = layout->top_right_corner_rounded; - fgeom->bottom_left_corner_rounded = layout->bottom_left_corner_rounded; - fgeom->bottom_right_corner_rounded = layout->bottom_right_corner_rounded; -} +#define MIN_SIZE_FOR_ROUNDING 3 + + fgeom->top_left_corner_rounded = FALSE; + fgeom->top_right_corner_rounded = FALSE; + fgeom->bottom_left_corner_rounded = FALSE; + fgeom->bottom_right_corner_rounded = FALSE; + + if (fgeom->top_height >= MIN_SIZE_FOR_ROUNDING) + { + if (fgeom->left_width >= MIN_SIZE_FOR_ROUNDING) + fgeom->top_left_corner_rounded = layout->top_left_corner_rounded; + if (fgeom->right_width >= MIN_SIZE_FOR_ROUNDING) + fgeom->top_right_corner_rounded = layout->top_right_corner_rounded; + } + if (fgeom->bottom_height >= MIN_SIZE_FOR_ROUNDING) + { + if (fgeom->left_width >= MIN_SIZE_FOR_ROUNDING) + fgeom->bottom_left_corner_rounded = layout->bottom_left_corner_rounded; + if (fgeom->right_width >= MIN_SIZE_FOR_ROUNDING) + fgeom->bottom_right_corner_rounded = layout->bottom_right_corner_rounded; + } +} MetaGradientSpec* meta_gradient_spec_new (MetaGradientType type) diff --git a/src/window.c b/src/window.c index 2f0936f..083adc8 100644 --- a/src/window.c +++ b/src/window.c @@ -4606,13 +4606,36 @@ update_sm_hints (MetaWindow *window) window->sm_client_id = g_strdup (str); meta_XFree (str); } - - meta_verbose ("Window %s client leader: 0x%lx SM_CLIENT_ID: '%s'\n", - window->desc, window->xclient_leader, - window->sm_client_id ? window->sm_client_id : "(null)"); } else - meta_verbose ("Didn't find a client leader for %s\n", window->desc); + { + meta_verbose ("Didn't find a client leader for %s\n", window->desc); + + if (!meta_prefs_get_disable_workarounds ()) + { + /* Some broken apps (kdelibs fault?) set SM_CLIENT_ID on the app + * instead of the client leader + */ + char *str; + + str = NULL; + if (meta_prop_get_latin1_string (window->display, window->xwindow, + window->display->atom_sm_client_id, + &str)) + { + if (window->sm_client_id == NULL) /* first time through */ + meta_warning (_("Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"), + window->desc); + + window->sm_client_id = g_strdup (str); + meta_XFree (str); + } + } + } + + meta_verbose ("Window %s client leader: 0x%lx SM_CLIENT_ID: '%s'\n", + window->desc, window->xclient_leader, + window->sm_client_id ? window->sm_client_id : "(null)"); } static void |