mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
don't use gdk_display_name
2001-09-08 Havoc Pennington <hp@pobox.com> * src/ui.c (meta_ui_init): don't use gdk_display_name * src/frame.c (meta_window_ensure_frame): create frame with screen default visual, rather than client window visual; for DRI games, the client window visual was not allowed to be a child of another window with the same visual, apparently. Anyhow now we copy twm, etc. so it must be correct. * src/place.c (meta_window_place): if a transient is placed and its parent has focus, focus the transient.
This commit is contained in:
parent
bc787fc1f3
commit
936adc6ea5
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
|||||||
|
2001-09-08 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
|
* src/ui.c (meta_ui_init): don't use gdk_display_name
|
||||||
|
|
||||||
|
* src/frame.c (meta_window_ensure_frame): create frame
|
||||||
|
with screen default visual, rather than client window visual;
|
||||||
|
for DRI games, the client window visual was not allowed to be
|
||||||
|
a child of another window with the same visual, apparently.
|
||||||
|
Anyhow now we copy twm, etc. so it must be correct.
|
||||||
|
|
||||||
|
* src/place.c (meta_window_place): if a transient is placed and
|
||||||
|
its parent has focus, focus the transient.
|
||||||
|
|
||||||
2001-09-06 Havoc Pennington <hp@pobox.com>
|
2001-09-06 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* configure.in: bump version 2.3.5, require newer GTK release
|
* configure.in: bump version 2.3.5, require newer GTK release
|
||||||
|
23
src/frame.c
23
src/frame.c
@ -56,6 +56,19 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
frame->mapped = FALSE;
|
frame->mapped = FALSE;
|
||||||
|
|
||||||
attrs.event_mask = EVENT_MASK;
|
attrs.event_mask = EVENT_MASK;
|
||||||
|
|
||||||
|
meta_verbose ("Framing window %s: visual %s default, depth %d default depth %d\n",
|
||||||
|
window->desc,
|
||||||
|
XVisualIDFromVisual (window->xvisual) ==
|
||||||
|
XVisualIDFromVisual (window->screen->default_xvisual) ?
|
||||||
|
"is" : "is not",
|
||||||
|
window->depth, window->screen->default_depth);
|
||||||
|
|
||||||
|
/* Default depth/visual handles clients with weird visuals; they can
|
||||||
|
* always be children of the root depth/visual obviously, but
|
||||||
|
* e.g. DRI games can't be children of a parent that has the same
|
||||||
|
* visual as the client.
|
||||||
|
*/
|
||||||
|
|
||||||
frame->xwindow = XCreateWindow (window->display->xdisplay,
|
frame->xwindow = XCreateWindow (window->display->xdisplay,
|
||||||
window->screen->xroot,
|
window->screen->xroot,
|
||||||
@ -64,9 +77,9 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
frame->rect.width,
|
frame->rect.width,
|
||||||
frame->rect.height,
|
frame->rect.height,
|
||||||
0,
|
0,
|
||||||
window->depth,
|
window->screen->default_depth,
|
||||||
InputOutput,
|
CopyFromParent,
|
||||||
window->xvisual,
|
window->screen->default_xvisual,
|
||||||
CWEventMask,
|
CWEventMask,
|
||||||
&attrs);
|
&attrs);
|
||||||
|
|
||||||
@ -90,15 +103,17 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
* we don't want to take that as a withdraw
|
* we don't want to take that as a withdraw
|
||||||
*/
|
*/
|
||||||
window->unmaps_pending += 1;
|
window->unmaps_pending += 1;
|
||||||
|
/* window was reparented to this position */
|
||||||
window->rect.x = 0;
|
window->rect.x = 0;
|
||||||
window->rect.y = 0;
|
window->rect.y = 0;
|
||||||
|
|
||||||
XReparentWindow (window->display->xdisplay,
|
XReparentWindow (window->display->xdisplay,
|
||||||
window->xwindow,
|
window->xwindow,
|
||||||
frame->xwindow,
|
frame->xwindow,
|
||||||
window->rect.x,
|
window->rect.x,
|
||||||
window->rect.y);
|
window->rect.y);
|
||||||
meta_error_trap_pop (window->display);
|
meta_error_trap_pop (window->display);
|
||||||
|
|
||||||
/* stick frame to the window */
|
/* stick frame to the window */
|
||||||
window->frame = frame;
|
window->frame = frame;
|
||||||
|
|
||||||
|
@ -253,6 +253,12 @@ meta_window_place (MetaWindow *window,
|
|||||||
meta_verbose ("Centered window %s over transient parent\n",
|
meta_verbose ("Centered window %s over transient parent\n",
|
||||||
window->desc);
|
window->desc);
|
||||||
|
|
||||||
|
if (parent->has_focus)
|
||||||
|
{
|
||||||
|
meta_verbose ("Focusing transient window since parent had focus\n");
|
||||||
|
meta_window_focus (window, CurrentTime); /* FIXME CurrentTime */
|
||||||
|
}
|
||||||
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,6 +195,8 @@ meta_screen_new (MetaDisplay *display,
|
|||||||
screen->width = WidthOfScreen (screen->xscreen);
|
screen->width = WidthOfScreen (screen->xscreen);
|
||||||
screen->height = HeightOfScreen (screen->xscreen);
|
screen->height = HeightOfScreen (screen->xscreen);
|
||||||
screen->current_cursor = -1; /* invalid/unset */
|
screen->current_cursor = -1; /* invalid/unset */
|
||||||
|
screen->default_xvisual = DefaultVisualOfScreen (screen->xscreen);
|
||||||
|
screen->default_depth = DefaultDepthOfScreen (screen->xscreen);
|
||||||
|
|
||||||
meta_screen_set_cursor (screen, META_CURSOR_DEFAULT);
|
meta_screen_set_cursor (screen, META_CURSOR_DEFAULT);
|
||||||
|
|
||||||
|
@ -41,6 +41,8 @@ struct _MetaScreen
|
|||||||
char *screen_name;
|
char *screen_name;
|
||||||
Screen *xscreen;
|
Screen *xscreen;
|
||||||
Window xroot;
|
Window xroot;
|
||||||
|
int default_depth;
|
||||||
|
Visual *default_xvisual;
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
MetaUI *ui;
|
MetaUI *ui;
|
||||||
|
2
src/ui.c
2
src/ui.c
@ -36,7 +36,7 @@ void
|
|||||||
meta_ui_init (int *argc, char ***argv)
|
meta_ui_init (int *argc, char ***argv)
|
||||||
{
|
{
|
||||||
if (!gtk_init_check (argc, argv))
|
if (!gtk_init_check (argc, argv))
|
||||||
meta_fatal ("Unable to open X display %s\n", gdk_display_name);
|
meta_fatal ("Unable to open X display %s\n", XDisplayName (gdk_display));
|
||||||
}
|
}
|
||||||
|
|
||||||
Display*
|
Display*
|
||||||
|
@ -4354,7 +4354,7 @@ constrain_size (MetaWindow *window,
|
|||||||
|
|
||||||
maxw = window->size_hints.max_width;
|
maxw = window->size_hints.max_width;
|
||||||
maxh = window->size_hints.max_height;
|
maxh = window->size_hints.max_height;
|
||||||
|
|
||||||
if (window->maximized)
|
if (window->maximized)
|
||||||
/* we used to only constrain to fit inside screen for these cases,
|
/* we used to only constrain to fit inside screen for these cases,
|
||||||
* but now I don't remember why I did that.
|
* but now I don't remember why I did that.
|
||||||
|
Loading…
Reference in New Issue
Block a user