mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
1998-10-23 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop.c (desktop_icon_set_position): Do not lower the window. The gnome-compliant wm will know what to do with windows on the Desktop layer. (post_setup_desktop_icon): Likewise. * desktop-icon.c (create_window_shape): Fetch the mask of the image "by hand", as we cannot rely on the canvas item having created it yet. * desktop-icon.c (desktop_icon_realize): Doh. We need to initialize the gnome_win_hints before we set any of the hints.
This commit is contained in:
parent
5bcfa822f9
commit
c5dca5a751
@ -1,5 +1,14 @@
|
||||
1998-10-23 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gdesktop.c (desktop_icon_set_position): Do not lower the
|
||||
window. The gnome-compliant wm will know what to do with windows
|
||||
on the Desktop layer.
|
||||
(post_setup_desktop_icon): Likewise.
|
||||
|
||||
* desktop-icon.c (create_window_shape): Fetch the mask of the
|
||||
image "by hand", as we cannot rely on the canvas item having
|
||||
created it yet.
|
||||
|
||||
* desktop-icon.c (desktop_icon_realize): Doh. We need to
|
||||
initialize the gnome_win_hints before we set any of the hints.
|
||||
|
||||
|
@ -64,6 +64,7 @@ desktop_icon_class_init (DesktopIconClass *class)
|
||||
static void
|
||||
create_window_shape (DesktopIcon *dicon, int icon_width, int icon_height, int text_width, int text_height)
|
||||
{
|
||||
GdkImlibImage *im;
|
||||
GdkBitmap *mask;
|
||||
GdkBitmap *im_mask;
|
||||
GdkGC *mgc;
|
||||
@ -78,21 +79,24 @@ create_window_shape (DesktopIcon *dicon, int icon_width, int icon_height, int te
|
||||
gdk_gc_set_foreground (mgc, &c);
|
||||
gdk_draw_rectangle (mask, mgc, TRUE, 0, 0, dicon->width, dicon->height);
|
||||
|
||||
/* Paint the mask of the image */
|
||||
|
||||
c.pixel = 1;
|
||||
gdk_gc_set_foreground (mgc, &c);
|
||||
|
||||
im_mask = GNOME_CANVAS_IMAGE (dicon->icon)->mask;
|
||||
|
||||
if (im_mask)
|
||||
/* Paint the mask of the image */
|
||||
|
||||
im = GNOME_CANVAS_IMAGE (dicon->icon)->im;
|
||||
gdk_imlib_render (im, im->rgb_width, im->rgb_height);
|
||||
im_mask = gdk_imlib_move_mask (im);
|
||||
|
||||
if (im_mask) {
|
||||
gdk_draw_pixmap (mask,
|
||||
mgc,
|
||||
im_mask,
|
||||
0, 0,
|
||||
(dicon->width - icon_width) / 2, 0,
|
||||
icon_width, icon_height);
|
||||
else
|
||||
gdk_imlib_free_bitmap (im_mask);
|
||||
} else
|
||||
gdk_draw_rectangle (mask, mgc, TRUE,
|
||||
(dicon->width - icon_width) / 2, 0,
|
||||
icon_width, icon_height);
|
||||
@ -210,12 +214,12 @@ desktop_icon_realize (GtkWidget *widget)
|
||||
|
||||
/* Set the window decorations to none and hints to the appropriate combination */
|
||||
|
||||
gdk_window_set_decorations (widget->window, 0);
|
||||
gdk_window_set_functions (widget->window, 0);
|
||||
|
||||
gnome_win_hints_init ();
|
||||
|
||||
if (gnome_win_hints_wm_exists ()) {
|
||||
gdk_window_set_decorations (widget->window, 0);
|
||||
gdk_window_set_functions (widget->window, 0);
|
||||
|
||||
gnome_win_hints_set_layer (widget, WIN_LAYER_DESKTOP);
|
||||
gnome_win_hints_set_hints (widget,
|
||||
(WIN_HINTS_SKIP_FOCUS
|
||||
|
@ -2,7 +2,8 @@
|
||||
* Controls the desktop contents
|
||||
* (C) 1998 the Free Software Foundation
|
||||
*
|
||||
* Author: Miguel de Icaza (miguel@gnu.org)
|
||||
* Authors: Miguel de Icaza (miguel@gnu.org)
|
||||
* Federico Mena (federico@nuclecu.unam.mx)
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <gnome.h>
|
||||
@ -206,7 +207,6 @@ desktop_icon_set_position (desktop_icon_t *di)
|
||||
di->x = x;
|
||||
di->y = y;
|
||||
|
||||
gdk_window_lower (di->widget->window);
|
||||
gtk_widget_set_uposition (di->widget, x, y);
|
||||
}
|
||||
|
||||
@ -1074,9 +1074,6 @@ post_setup_desktop_icon (desktop_icon_t *di, int show)
|
||||
#endif
|
||||
if (show)
|
||||
gtk_widget_show (di->widget);
|
||||
|
||||
/* lower the window */
|
||||
gdk_window_lower (di->widget->window);
|
||||
}
|
||||
|
||||
/* Pops up the icon properties pages */
|
||||
|
Loading…
Reference in New Issue
Block a user