spicec: Remove spice-client watermark (rhbz#662450)

This patch stops us from drawing the spice client watermark at the top of
the virtual machine view. We have had requests through several channels to
remove this as it has little added value, and is seen as annoying by some.
Given that we now also have a bugzilla for this I think it is time we really
remove it.
(cherry picked from commit 392ed65dda)
This commit is contained in:
Hans de Goede 2010-12-13 15:56:27 +01:00
parent bb1a6898f9
commit ce870ca4ac
9 changed files with 2 additions and 1060 deletions

View File

@ -201,9 +201,7 @@ private:
void update_sticky_rect();
private:
AlphaImageFromRes _info_pixmap;
AlphaImageFromRes _sticky_pixmap;
SpicePoint _info_pos;
SpicePoint _sticky_pos;
SpiceRect _sticky_rect;
bool _sticky_on;
@ -212,7 +210,6 @@ private:
InfoLayer::InfoLayer()
: ScreenLayer(SCREEN_LAYER_INFO, false)
, _info_pixmap (INFO_IMAGE_RES_ID)
, _sticky_pixmap (STICKY_KEY_PIXMAP)
, _sticky_on (false)
{
@ -232,11 +229,9 @@ void InfoLayer::draw_info(const QRegion& dest_region, RedDrawable& dest)
r.right = rects[i].x2;
r.bottom = rects[i].y2;
/* is rect inside sticky region or info region? */
/* is rect inside sticky region ? */
if (_sticky_on && rect_intersects(r, _sticky_rect)) {
dest.blend_pixels(_sticky_pixmap, r.left - _sticky_pos.x, r.top - _sticky_pos.y, r);
} else {
dest.blend_pixels(_info_pixmap, r.left - _info_pos.x, r.top - _info_pos.y, r);
}
}
}
@ -249,21 +244,9 @@ void InfoLayer::copy_pixels(const QRegion& dest_region, RedDrawable& dest_dc)
void InfoLayer::set_info_mode()
{
RecurciveLock lock(_update_lock);
ASSERT(screen());
SpicePoint size = _info_pixmap.get_size();
SpicePoint screen_size = screen()->get_size();
SpiceRect r;
r.left = (screen_size.x - size.x) / 2;
r.right = r.left + size.x;
_info_pos.x = r.right - size.x;
_info_pos.y = r.top = 0;
r.bottom = r.top + size.y;
lock.unlock();
set_rect_area(r);
clear_area();
update_sticky_rect();
set_sticky(_sticky_on);
}

View File

@ -52,7 +52,6 @@ END
// Bitmap
//
INFO_IMAGE_RES_ID BITMAP "static_title.bmp"
ALT_IMAGE_RES_ID BITMAP "sticky_alt.bmp"
/////////////////////////////////////////////////////////////////////////////

View File

@ -903,10 +903,6 @@
RelativePath=".\spicec.exe.manifest"
>
</File>
<File
RelativePath=".\static_title.bmp"
>
</File>
<File
RelativePath=".\sticky_alt.bmp"
>

View File

@ -3,7 +3,6 @@
// Used by redc.rc
//
#define RED_ICON_RES_ID 5
#define INFO_IMAGE_RES_ID 102
#define IDI_ICON_APPLICATION 103
#define ALT_IMAGE_RES_ID 104

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,5 +1,4 @@
EXTRA_DIST = \
info_image.c \
red_icon.c \
alt_image.c \
$(NULL)

File diff suppressed because it is too large Load Diff

View File

@ -18,15 +18,6 @@
#include "common.h"
#include "resource.h"
#include "images/info_image.c"
static const PixmapHeader info_image = {
(uint8_t *)_info_image.pixel_data,
_info_image.width,
_info_image.height,
_info_image.width * 4,
};
#include "images/alt_image.c"
static const PixmapHeader alt_image = {
@ -42,7 +33,6 @@ typedef struct ResImage {
} ResImage;
static const ResImage res_image_map[] = {
{ INFO_IMAGE_RES_ID, &info_image},
{ ALT_IMAGE_RES_ID, &alt_image},
{0, NULL},
};

View File

@ -18,7 +18,6 @@
#ifndef _H_RED_RESOURCES
#define _H_RED_RESOURCES
#define INFO_IMAGE_RES_ID 2
#define RED_ICON_RES_ID 3
#define ALT_IMAGE_RES_ID 4