1
0
Fork 0

Fix some uninitialized memory usage errors. #427385

2007-04-23  Elijah Newren  <newren gmail com>

        Fix some uninitialized memory usage errors.  #427385

        * src/frame.c (meta_window_ensure_frame):
        * src/frames.c (meta_frames_manage_window):
        Do not try to set the window background in
        meta_frames_manage_window() since the frame window is not yet
        created and not yet registered with the corresponding MetaWindow.
        Do it inside meta_window_ensure_frame() instead.

svn path=/trunk/; revision=3208
This commit is contained in:
Elijah Newren 2007-04-23 22:44:01 +00:00 committed by Elijah Newren
parent b10626c5d8
commit 18c9101a4f
3 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,14 @@
2007-04-23 Elijah Newren <newren gmail com>
Fix some uninitialized memory usage errors. #427385
* src/frame.c (meta_window_ensure_frame):
* src/frames.c (meta_frames_manage_window):
Do not try to set the window background in
meta_frames_manage_window() since the frame window is not yet
created and not yet registered with the corresponding MetaWindow.
Do it inside meta_window_ensure_frame() instead.
2007-04-17 Elijah Newren <newren gmail com>
Fix some fallout from #426519; update user_rect for all position

View file

@ -114,6 +114,11 @@ meta_window_ensure_frame (MetaWindow *window)
meta_display_register_x_window (window->display, &frame->xwindow, window);
/* Now that frame->xwindow is registered with window, we can set its
* background.
*/
meta_ui_reset_frame_bg (window->screen->ui, frame->xwindow);
/* Reparent the client window; it may be destroyed,
* thus the error trap. We'll get a destroy notify later
* and free everything. Comment in FVWM source code says

View file

@ -571,9 +571,6 @@ meta_frames_manage_window (MetaFrames *frames,
gdk_window_set_user_data (frame->window, frames);
/* Set the window background to the current style */
meta_frames_set_window_background (frames, frame);
/* Don't set event mask here, it's in frame.c */
frame->xwindow = xwindow;
@ -584,6 +581,11 @@ meta_frames_manage_window (MetaFrames *frames,
frame->expose_delayed = FALSE;
frame->shape_applied = FALSE;
frame->prelit_control = META_FRAME_CONTROL_NONE;
/* Don't set the window background yet; we need frame->xwindow to be
* registered with its MetaWindow, which happens after this function
* and meta_ui_create_frame_window() return to meta_window_ensure_frame().
*/
meta_core_grab_buttons (gdk_display, frame->xwindow);