mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
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.
This commit is contained in:
parent
b9002db37f
commit
cbb4a91113
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
27
src/theme.c
27
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)
|
||||
|
33
src/window.c
33
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
|
||||
|
Loading…
Reference in New Issue
Block a user