mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-28 16:17:09 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d68561769d |
+2
-2
@@ -1,5 +1,5 @@
|
||||
MAJOR_VERSION = 5
|
||||
MINOR_VERSION = 0
|
||||
MAJOR_VERSION = 4
|
||||
MINOR_VERSION = 1
|
||||
MICRO_VERSION = 0
|
||||
EXTRAVERSION =
|
||||
|
||||
|
||||
+20
-12
@@ -1,7 +1,7 @@
|
||||
# Release Notes
|
||||
|
||||
- [Version 5.0.0](#version-500)
|
||||
+ [What's new in version 5.0.0](#whats-new-in-version-500)
|
||||
- [Version 4.9.2](#version-492)
|
||||
+ [What's new in this version](#whats-new-in-this-version)
|
||||
+ [Compositing schema](#compositing-schema)
|
||||
+ [New main window styles](#new-main-window-styles)
|
||||
+ [Virtual window](#virtual-window)
|
||||
@@ -10,22 +10,25 @@
|
||||
+ [Changes leading to incompatibility](#changes-leading-to-incompatibility)
|
||||
+ [Deprecated APIs](#deprecated-apis)
|
||||
|
||||
## Version 5.0.0
|
||||
## Version 4.9.2
|
||||
|
||||
The MiniGUI development team announces the availability of MiniGUI 5.0.0,
|
||||
which is the first official release of MiniGUI 5.0.x.
|
||||
The MiniGUI development team announces the availability of MiniGUI 4.9.2,
|
||||
which is the third preview release of MiniGUI 5.0.0.
|
||||
|
||||
This version brings us some new and exciting features, and we did our best
|
||||
to ensure backward compatibility of the existed APIs so that the old
|
||||
applications can smoothly migrate to the new version.
|
||||
We recommend that you use this version and report any bugs and
|
||||
This is an unstable release to show you some new and exciting features.
|
||||
Here `unstable` means that the new APIs we introduced in this version
|
||||
may change in the official release.
|
||||
|
||||
Nevertheless, we did our best to ensure backward compatibility of the
|
||||
existed APIs so that the old applications can smoothly migrate to the new
|
||||
version. We recommend that you test this version and report any bugs and
|
||||
incompatibilities in
|
||||
|
||||
<https://github.com/VincentWei/minigui/tree/rel-5-0>
|
||||
<https://github.com/VincentWei/minigui/tree/dev-4-1>
|
||||
|
||||
### What's new in version 5.0.0
|
||||
### What's new in this version
|
||||
|
||||
In the development of version 5.0.x, we introduced the following new and
|
||||
In the development of version 4.9.x, we introduced the following new and
|
||||
exciting features for MiniGUI:
|
||||
|
||||
* ENHANCEMENTS:
|
||||
@@ -79,6 +82,11 @@ exciting features for MiniGUI:
|
||||
message queue, event/message handling, and part of graphics abstract
|
||||
layer.
|
||||
|
||||
The following new features will be developed in the successive versions of
|
||||
4.9.x:
|
||||
|
||||
- Enhance other frequently used GAL engines to support compositing schema.
|
||||
|
||||
### Compositing schema
|
||||
|
||||
In this version, we enhanced the MiniGUI-Processes runtime mode to support
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
Version 5.0.0 (2019/03/30)
|
||||
Version 5.0.0 (2019/03/31)
|
||||
|
||||
This is the first official release of MiniGUI 5.0.x, the stable version.
|
||||
This is the second preview version of MiniGUI 5.0.0, an unstable version.
|
||||
|
||||
Other packages for MiniGUI resource, tools, components, and samples:
|
||||
|
||||
- GVFB: `gvfb-1.2.5.tar.gz`
|
||||
- The resource package: `minigui-res-5.0.0.tar.gz`
|
||||
- GVFB: `gvfb-1.2.4.tar.gz`
|
||||
- The resource package: `minigui-res-4.0.0.tar.gz`
|
||||
- mGUtils component: `libmgutils-1.5.0.tar.gz`
|
||||
- mGPlus component: `libmgplus-1.5.0.tar.gz`
|
||||
- mGEff component: `libmgeff-1.5.0.tar.gz`
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT(libminigui, 5.0.0)
|
||||
AC_INIT(libminigui, 4.9.2)
|
||||
AC_CONFIG_SRCDIR(src/main/main.c)
|
||||
|
||||
dnl Set various version strings - taken gratefully from the SDL sources
|
||||
@@ -14,9 +14,9 @@ dnl Set various version strings - taken gratefully from the SDL sources
|
||||
# if backwards compatibility has been broken,
|
||||
# set MINIGUI_BINARY_AGE and MINIGUI_INTERFACE_AGE to 0.
|
||||
#
|
||||
MINIGUI_MAJOR_VERSION=5
|
||||
MINIGUI_MINOR_VERSION=0
|
||||
MINIGUI_MICRO_VERSION=0
|
||||
MINIGUI_MAJOR_VERSION=4
|
||||
MINIGUI_MINOR_VERSION=9
|
||||
MINIGUI_MICRO_VERSION=2
|
||||
MINIGUI_INTERFACE_AGE=0
|
||||
MINIGUI_BINARY_AGE=0
|
||||
MINIGUI_VERSION=$MINIGUI_MAJOR_VERSION.$MINIGUI_MINOR_VERSION.$MINIGUI_MICRO_VERSION
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ double_buffering=true
|
||||
|
||||
# The filename of the shared library for the external driver.
|
||||
# The equivalent environment variable: MG_GAL_DRM_DRIVER
|
||||
exdriver=libhidrmdrivers-0.2.so.0
|
||||
exdriver=libhidrmdrivers.so.0
|
||||
#}}
|
||||
|
||||
#{{ifdef _MGIAL_LIBINPUT
|
||||
|
||||
+7
-7
@@ -298,7 +298,7 @@ typedef struct _DrmDriverOps {
|
||||
ColorLogicalOp logic_op);
|
||||
|
||||
/**
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* value specified to a destination buffer.
|
||||
*
|
||||
* \note If this operation is set as NULL, the driver does not support
|
||||
@@ -310,7 +310,7 @@ typedef struct _DrmDriverOps {
|
||||
uint8_t alpha);
|
||||
|
||||
/**
|
||||
* This operation blits pixels from a source buffer to a destination buffer,
|
||||
* This operation blits pixles from a source buffer to a destination buffer,
|
||||
* but skipping the pixel value specified by \a color_key.
|
||||
*
|
||||
* \note If this operation is set as NULL, the driver does not support
|
||||
@@ -322,7 +322,7 @@ typedef struct _DrmDriverOps {
|
||||
uint32_t color_key);
|
||||
|
||||
/**
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* value specified to a destination buffer, but skipping the pixel value
|
||||
* specified.
|
||||
*
|
||||
@@ -335,7 +335,7 @@ typedef struct _DrmDriverOps {
|
||||
uint8_t alpha, uint32_t color_key);
|
||||
|
||||
/**
|
||||
* This operation blits pixels from a source buffer with the source alpha
|
||||
* This operation blits pixles from a source buffer with the source alpha
|
||||
* value of pixels to the destination buffer, and with the specified color
|
||||
* compositing/blending method (\a ColorBlendMethod).
|
||||
*
|
||||
@@ -372,12 +372,12 @@ typedef struct _DrmDriverOps {
|
||||
* For example, for Intel i915/i965 GPUs, the driver name will be `i915`.
|
||||
* \param device_fd This argument gives the file descriptor of the
|
||||
* opened DRI device.
|
||||
* \param version A pointer to an integer which will be used to return
|
||||
* the interface version of the DRM engine driver.
|
||||
* \param version A pointer to an integer which will contain the
|
||||
* versionc of the DRM engine driver.
|
||||
*
|
||||
* \return NULL or a valid pointer to DrmDriverOps.
|
||||
*
|
||||
* \note We use the version control since 4.0.7. It will be initialized
|
||||
* \note We use the version control since 4.0.7. It will be intialized
|
||||
* to zero by MiniGUI before calling this function. Because an old
|
||||
* driver for MiniGUI 4.0.6 or earlier will not change the value,
|
||||
* MiniGUI will deny to load the old driver.
|
||||
|
||||
+1
-1
@@ -5393,7 +5393,6 @@ static BOOL _wndInvalidateRect(HWND hWnd, const RECT* prc, BOOL bEraseBkgnd, int
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
_WRN_PRINTF ("The invalid region is forzen\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -5574,6 +5573,7 @@ HDC GUIAPI BeginPaint (HWND hWnd)
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), HDC_INVALID);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
|
||||
if (pWin->pCaretInfo && pWin->pCaretInfo->fBlink) {
|
||||
HideCaretEx (hWnd, FALSE);
|
||||
pWin->pCaretInfo->fBlink = TRUE;
|
||||
|
||||
@@ -7,4 +7,4 @@ noinst_HEADERS = \
|
||||
ourhdr.h client.h server.h sharedres.h sockio.h drawsemop.h \
|
||||
gal.h newgal.h memops.h incoreres.h sysres.h clipboard.h \
|
||||
glyph.h license.h mgsock.h unicode-ops.h \
|
||||
linux-tty.h debug.h map.h
|
||||
linux-tty.h debug.h
|
||||
|
||||
@@ -77,7 +77,7 @@ struct _CompositorCtxt {
|
||||
CLIPRGN wins_rgn; // visible region for all windows (subtract popup menus)
|
||||
CLIPRGN dirty_rgn; // the dirty region
|
||||
CLIPRGN inv_rgn; // the invalid region for a specific znode
|
||||
Uint32 dirty_types;// the dirty znode types.
|
||||
//Uint32 dirty_types;// the dirty znode types.
|
||||
};
|
||||
|
||||
static CompositorCtxt* initialize (const char* name)
|
||||
@@ -334,11 +334,9 @@ static void composite_ppp_znodes (CompositorCtxt* ctxt)
|
||||
ClipRgnIntersect (&ctxt->inv_rgn, &ctxt->dirty_rgn, rgn);
|
||||
if (IsEmptyClipRgn (&ctxt->inv_rgn)) {
|
||||
ServerReleasePopupMenuZNodeHeader (zidx);
|
||||
_DBG_PRINTF ("ppp %d skipped\n", zidx);
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF ("ppp %d composited\n", zidx);
|
||||
// blit this popup menu to screen
|
||||
SelectClipRegion (HDC_SCREEN_SYS, &ctxt->inv_rgn);
|
||||
BitBlt (znode_hdr->mem_dc, 0, 0,
|
||||
@@ -614,15 +612,14 @@ static BOOL reset_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
if (layer != mgTopmostLayer)
|
||||
return FALSE;
|
||||
|
||||
ctxt->dirty_types = 0;
|
||||
//ctxt->dirty_types = 0;
|
||||
EmptyClipRgn (&ctxt->dirty_rgn);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL merge_dirty_region (CompositorCtxt* ctxt,
|
||||
static BOOL generate_dirty_region (CompositorCtxt* ctxt,
|
||||
const ZNODEHEADER* znode_hdr, const CLIPRGN* znode_rgn)
|
||||
{
|
||||
EmptyClipRgn (&ctxt->inv_rgn);
|
||||
if (znode_hdr && znode_hdr->dirty_rcs) {
|
||||
int i;
|
||||
for (i = 0; i < znode_hdr->nr_dirty_rcs; i++) {
|
||||
@@ -631,23 +628,16 @@ static BOOL merge_dirty_region (CompositorCtxt* ctxt,
|
||||
// device coordinates to screen coordinates
|
||||
rc = znode_hdr->dirty_rcs [i];
|
||||
OffsetRect (&rc, znode_hdr->rc.left, znode_hdr->rc.top);
|
||||
AddClipRect (&ctxt->inv_rgn, &rc);
|
||||
AddClipRect (&ctxt->dirty_rgn, &rc);
|
||||
}
|
||||
|
||||
if (znode_rgn)
|
||||
IntersectRegion (&ctxt->inv_rgn, &ctxt->inv_rgn, znode_rgn);
|
||||
IntersectRegion (&ctxt->dirty_rgn, &ctxt->dirty_rgn, znode_rgn);
|
||||
else
|
||||
IntersectClipRect (&ctxt->inv_rgn, &ctxt->rc_screen);
|
||||
|
||||
IntersectClipRect (&ctxt->dirty_rgn, &ctxt->rc_screen);
|
||||
}
|
||||
|
||||
if (IsEmptyClipRgn (&ctxt->inv_rgn)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
UnionRegion (&ctxt->dirty_rgn, &ctxt->dirty_rgn, &ctxt->inv_rgn);
|
||||
EmptyClipRgn (&ctxt->inv_rgn);
|
||||
return TRUE;
|
||||
return !IsEmptyClipRgn (&ctxt->dirty_rgn);
|
||||
}
|
||||
|
||||
static BOOL merge_dirty_ppp (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
@@ -659,16 +649,15 @@ static BOOL merge_dirty_ppp (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
_DBG_PRINTF("called: %d\n", zidx);
|
||||
|
||||
/* the fallback compositor only manages znodes on the topmost layer. */
|
||||
if (layer != mgTopmostLayer)
|
||||
if (layer != mgTopmostLayer || zidx <= 0)
|
||||
return rc;
|
||||
|
||||
znode_hdr = ServerGetPopupMenuZNodeHeader (zidx, (void**)&rgn, TRUE);
|
||||
if (merge_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
ctxt->dirty_types |= DIRTY_ZT_PPP;
|
||||
if (generate_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
//ctxt->dirty_types |= DIRTY_ZT_PPP;
|
||||
rc = TRUE;
|
||||
}
|
||||
ServerReleasePopupMenuZNodeHeader (zidx);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -679,15 +668,15 @@ static BOOL merge_dirty_win (CompositorCtxt* ctxt, MG_Layer* layer, int zidx)
|
||||
CLIPRGN *rgn;
|
||||
|
||||
/* the fallback compositor only manages znodes on the topmost layer. */
|
||||
if (layer != mgTopmostLayer)
|
||||
if (layer != mgTopmostLayer || zidx <= 0)
|
||||
return rc;
|
||||
|
||||
_DBG_PRINTF("called: %d\n", zidx);
|
||||
|
||||
/* merge the dirty region */
|
||||
znode_hdr = ServerGetWinZNodeHeader (NULL, zidx, (void**)&rgn, TRUE);
|
||||
if (merge_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
ctxt->dirty_types |= DIRTY_ZT_WIN;
|
||||
if (generate_dirty_region (ctxt, znode_hdr, rgn)) {
|
||||
//ctxt->dirty_types |= DIRTY_ZT_WIN;
|
||||
rc = TRUE;
|
||||
}
|
||||
ServerReleaseWinZNodeHeader (NULL, zidx);
|
||||
@@ -700,10 +689,10 @@ static BOOL merge_dirty_wpp (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
const ZNODEHEADER* znode_hdr;
|
||||
|
||||
znode_hdr = ServerGetWinZNodeHeader (NULL, 0, NULL, TRUE);
|
||||
if (merge_dirty_region (ctxt, znode_hdr, NULL)) {
|
||||
if (generate_dirty_region (ctxt, znode_hdr, NULL)) {
|
||||
tile_dirty_region_for_wallpaper (ctxt);
|
||||
//subtract_opaque_win_znodes_above (ctxt, 0);
|
||||
ctxt->dirty_types |= DIRTY_ZT_WPP;
|
||||
//ctxt->dirty_types |= DIRTY_ZT_WPP;
|
||||
rc = TRUE;
|
||||
}
|
||||
|
||||
@@ -717,13 +706,10 @@ BOOL refresh_dirty_region (CompositorCtxt* ctxt, MG_Layer* layer)
|
||||
if (layer != mgTopmostLayer || IsEmptyClipRgn (&ctxt->dirty_rgn))
|
||||
return FALSE;
|
||||
|
||||
if (ctxt->dirty_types & DIRTY_ZT_PPP)
|
||||
composite_ppp_znodes (ctxt);
|
||||
composite_ppp_znodes (ctxt);
|
||||
composite_on_dirty_region (ctxt, 0);
|
||||
|
||||
EmptyClipRgn (&ctxt->dirty_rgn);
|
||||
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -270,9 +270,8 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
if (!ops->reset_dirty_region (ctxt, layer))
|
||||
return;
|
||||
|
||||
/* travel menu znodes on the layer;
|
||||
this will only work for topmost layer */
|
||||
if (layer == mgTopmostLayer && zi->nr_popupmenus > 0) {
|
||||
/* travel menu znodes on the layer */
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
pdc = dc_HDC2PDC (nodes[i].mem_dc);
|
||||
@@ -302,23 +301,21 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
}
|
||||
}
|
||||
|
||||
/* check wallpaper pattern; only call for topmost layer */
|
||||
if (layer == mgTopmostLayer) {
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
assert (pdc->surface->dirty_info);
|
||||
lock_znode_surface (pdc, nodes);
|
||||
changes_in_dc = pdc->surface->dirty_info->dirty_age;
|
||||
if (changes_in_dc != nodes[0].changes) {
|
||||
ops->merge_dirty_wpp (ctxt, layer);
|
||||
}
|
||||
/* check wallpaper pattern */
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
assert (pdc->surface->dirty_info);
|
||||
lock_znode_surface (pdc, nodes);
|
||||
changes_in_dc = pdc->surface->dirty_info->dirty_age;
|
||||
if (changes_in_dc != nodes[0].changes) {
|
||||
ops->merge_dirty_wpp (ctxt, layer);
|
||||
}
|
||||
}
|
||||
|
||||
ops->refresh_dirty_region (ctxt, layer);
|
||||
|
||||
/* unlock the znode surfaces for popup menus */
|
||||
if (layer == mgTopmostLayer && zi->nr_popupmenus > 0) {
|
||||
if (zi->nr_popupmenus > 0) {
|
||||
nodes = GET_MENUNODE(zi);
|
||||
for (i = 0; i < zi->nr_popupmenus; i++) {
|
||||
pdc = dc_HDC2PDC (nodes[i].mem_dc);
|
||||
@@ -341,15 +338,12 @@ static void composite_layer (MG_Layer* layer, CompositorCtxt* ctxt,
|
||||
}
|
||||
}
|
||||
|
||||
/* unlock the znode surfaces for wallpaper pattern;
|
||||
only for topmost layer */
|
||||
if (layer == mgTopmostLayer) {
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
nodes[0].changes = pdc->surface->dirty_info->dirty_age;
|
||||
pdc->surface->dirty_info->nr_dirty_rcs = 0;
|
||||
unlock_znode_surface (pdc, nodes);
|
||||
}
|
||||
/* unlock the znode surfaces for wallpaper patter */
|
||||
pdc = dc_HDC2PDC (HDC_SCREEN);
|
||||
if (pdc->surface->w > 0 && pdc->surface->h > 0) {
|
||||
nodes[0].changes = pdc->surface->dirty_info->dirty_age;
|
||||
pdc->surface->dirty_info->nr_dirty_rcs = 0;
|
||||
unlock_znode_surface (pdc, nodes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ static HCURSOR load_cursor_from_mem (const void* area)
|
||||
const Uint8* p = (Uint8*)area;
|
||||
WORD16 wTemp;
|
||||
|
||||
int w, h, xhot, yhot, colornum;
|
||||
int w = 0, h = 0, xhot = 0, yhot = 0, colornum = 0;
|
||||
#if 0
|
||||
DWORD32 size;
|
||||
#endif
|
||||
|
||||
@@ -298,10 +298,8 @@ static int update_client_window_rgn (int cli, HWND hwnd)
|
||||
msg.lParam = MAKELONG (crc->rc.right, crc->rc.bottom);
|
||||
|
||||
ret = __mg_send2client (&msg, mgClients + cli);
|
||||
if (ret < 0) {
|
||||
_WRN_PRINTF ("__mg_send2client failed\n");
|
||||
if (ret < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
crc = crc->next;
|
||||
}
|
||||
@@ -832,6 +830,7 @@ static int srvAllocZOrderNode (int cli, HWND hwnd, HWND main_win,
|
||||
|
||||
if (surf) {
|
||||
memdc = CreateMemDCFromSurface (surf);
|
||||
_WRN_PRINTF ("surface (%p) refcount: %d\n", surf, surf->refcount);
|
||||
if (memdc == HDC_INVALID) {
|
||||
if (cli > 0) {
|
||||
GAL_FreeSurface (surf);
|
||||
@@ -868,25 +867,16 @@ static BOOL _cb_update_cli_znode (void* context,
|
||||
if (znode->cli == cli && znode->flags & ZOF_VISIBLE && znode->hwnd) {
|
||||
MSG msg = {znode->hwnd, MSG_UPDATECLIWIN, 0, 0, __mg_tick_counter};
|
||||
|
||||
if (!IsRectEmpty(&znode->dirty_rc)) {
|
||||
if (!IsRectEmpty(&(znode->dirty_rc))) {
|
||||
|
||||
if (IntersectRect(&rcScr, &znode->rc, &rcScr) &&
|
||||
IntersectRect(&rcInv, &znode->dirty_rc, &rcScr)) {
|
||||
rcInv = znode->dirty_rc;
|
||||
msg.wParam = MAKELONG (rcInv.left, rcInv.top);
|
||||
msg.lParam = MAKELONG (rcInv.right, rcInv.bottom);
|
||||
IntersectRect(&rcInv, &znode->dirty_rc, &rcScr);
|
||||
|
||||
_DBG_PRINTF ("Send MSG_UPDATECLIWIN to client window (%s): "
|
||||
"%d, %d, %d x %d\n",
|
||||
znode->caption,
|
||||
rcInv.left, rcInv.top,
|
||||
rcInv.right - rcInv.left,
|
||||
rcInv.bottom - rcInv.top);
|
||||
msg.wParam = MAKELONG (rcInv.left, rcInv.top);
|
||||
msg.lParam = MAKELONG (rcInv.right, rcInv.bottom);
|
||||
|
||||
__mg_send2client (&msg, mgClients + znode->cli);
|
||||
}
|
||||
SetRectEmpty (&(znode->dirty_rc));
|
||||
|
||||
SetRectEmpty (&znode->dirty_rc);
|
||||
__mg_send2client (&msg, mgClients + znode->cli);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1211,7 +1201,6 @@ static int do_drag_drop_window (int msg, int x, int y)
|
||||
#ifndef _MGSCHEMA_COMPOSITING
|
||||
FocusRect (HDC_SCREEN_SYS, _dd_info.rc.left, _dd_info.rc.top,
|
||||
_dd_info.rc.right, _dd_info.rc.bottom);
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
#else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
msg.wParam = MAKELONG (_dd_info.rc.left, _dd_info.rc.top);
|
||||
@@ -1239,7 +1228,6 @@ static int do_drag_drop_window (int msg, int x, int y)
|
||||
SetPenColor (HDC_SCREEN_SYS, PIXEL_lightwhite);
|
||||
FocusRect (HDC_SCREEN_SYS, _dd_info.rc.left, _dd_info.rc.top,
|
||||
_dd_info.rc.right, _dd_info.rc.bottom);
|
||||
SyncUpdateDC (HDC_SCREEN_SYS);
|
||||
#endif /* not defined _MGSCHEMA_COMPOSITING */
|
||||
|
||||
/* post MSG_WINDOWDROPPED to the target window */
|
||||
|
||||
+30
-44
@@ -188,7 +188,7 @@ static BOOL subtract_rgn_by_node (PCLIPRGN region, const ZORDERINFO* zi,
|
||||
else
|
||||
SubtractClipRect(region, &(node->rc));
|
||||
|
||||
return !IsEmptyClipRgn(region);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#else /* not defined _MGSCHEMA_COMPOSITING */
|
||||
@@ -427,18 +427,15 @@ void __mg_update_window (HWND hwnd,
|
||||
((pWin->WinType == TYPE_CONTROL &&
|
||||
(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)) ||
|
||||
pWin->WinType != TYPE_CONTROL) && pWin->dwStyle & WS_VISIBLE) {
|
||||
RECT rcInv;
|
||||
SetRect(&rcInv, left, top, right, bottom);
|
||||
RECT invrc;
|
||||
SetRect(&invrc, left, top, right, bottom);
|
||||
|
||||
_DBG_PRINTF ("Update window (%s): %d, %d, %d, %d\n",
|
||||
pWin->spCaption, left, top, right, bottom);
|
||||
|
||||
if (IsRectEmpty (&rcInv)) {
|
||||
if (IsRectEmpty (&invrc)) {
|
||||
SendAsyncMessage ((HWND)pWin, MSG_NCPAINT, 0, 0);
|
||||
InvalidateRect ((HWND)pWin, NULL, TRUE);
|
||||
}
|
||||
else {
|
||||
RECT rcTemp, rcWin;
|
||||
RECT rcTemp, rcInv, rcWin;
|
||||
|
||||
if (pWin->WinType == TYPE_CONTROL &&
|
||||
(pWin->dwExStyle & WS_EX_CTRLASMAINWIN)){
|
||||
@@ -447,18 +444,13 @@ void __mg_update_window (HWND hwnd,
|
||||
else
|
||||
GetWindowRect(hwnd, &rcWin);
|
||||
|
||||
/* XXX: when we move a window fast, there are some dirty rectangles
|
||||
were not updated. We update whole area of the window for a work
|
||||
around. */
|
||||
if (IntersectRect (&rcTemp, &rcWin, &rcInv)) {
|
||||
if (IntersectRect (&rcTemp,
|
||||
&rcWin, &invrc)) {
|
||||
dskScreenToWindow (pWin, &rcTemp, &rcInv);
|
||||
SendAsyncMessage ((HWND)pWin,
|
||||
MSG_NCPAINT, 0, 0); // (LPARAM)(&rcInv));
|
||||
MSG_NCPAINT, 0, (LPARAM)(&rcInv));
|
||||
dskScreenToClient (pWin, &rcTemp, &rcInv);
|
||||
InvalidateRect ((HWND)pWin, NULL/*&rcInv*/, TRUE);
|
||||
}
|
||||
else {
|
||||
_DBG_PRINTF ("IGNORED update\n");
|
||||
InvalidateRect ((HWND)pWin, &rcInv, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -473,9 +465,6 @@ static int update_client_window (ZORDERNODE* znode, const RECT* rc)
|
||||
|
||||
if (znode->cli != 0) {
|
||||
if (rc) {
|
||||
_DBG_PRINTF ("Update window (%s): %d, %d, %d x %d\n",
|
||||
znode->caption, rc->left, rc->top,
|
||||
RECTWP(rc), RECTHP(rc));
|
||||
|
||||
if (IsRectEmpty (&znode->dirty_rc)) {
|
||||
SetRect (&znode->dirty_rc,
|
||||
@@ -484,8 +473,8 @@ static int update_client_window (ZORDERNODE* znode, const RECT* rc)
|
||||
else {
|
||||
GetBoundRect (&znode->dirty_rc, &znode->dirty_rc, rc);
|
||||
}
|
||||
mgClients [znode->cli].has_dirty = TRUE;
|
||||
}
|
||||
mgClients [znode->cli].has_dirty = TRUE;
|
||||
}
|
||||
else
|
||||
#endif /* defined _MGRM_PROCESSES */
|
||||
@@ -505,8 +494,7 @@ static BOOL _cb_update_znode (void* context,
|
||||
{
|
||||
const RECT* rc = (RECT*)context;
|
||||
|
||||
if (znode->flags & ZOF_VISIBLE &&
|
||||
znode->flags & ZOF_IF_REFERENCE) {
|
||||
if (znode->flags & ZOF_VISIBLE && znode->flags & ZOF_IF_REFERENCE) {
|
||||
update_client_window (znode, rc);
|
||||
znode->flags &= ~ZOF_IF_REFERENCE;
|
||||
return TRUE;
|
||||
@@ -3247,7 +3235,7 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
slot = nodes [idx_znode].next;
|
||||
for (; slot != 0; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
DoesIntersect (rcWin, &nodes [slot].rc)) {
|
||||
DoesIntersect (rcWin, &nodes [slot].rc)) {
|
||||
nodes [slot].age++;
|
||||
}
|
||||
}
|
||||
@@ -3260,7 +3248,6 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
//SetClipRgn (&sg_UpdateRgn, rcInv + i);
|
||||
SetClipRgn (&sg_UpdateRgn, &(nodes [idx_znode].rc));
|
||||
|
||||
/* znodes below current znode in the same level */
|
||||
slot = nodes [idx_znode].next;
|
||||
for (; slot > 0; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
@@ -3271,7 +3258,6 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
}
|
||||
|
||||
/* znodes below current level */
|
||||
for (level = 0; level < NR_ZORDER_LEVELS; level++) {
|
||||
if (type > _zof_types_for_level[level]) {
|
||||
slot = zi->first_in_levels[level];
|
||||
@@ -3386,10 +3372,12 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
do_for_all_znodes (NULL, zi, _cb_exclude_rc, ZT_ALL);
|
||||
}
|
||||
|
||||
while (slot) {
|
||||
if (slot == idx_znode)
|
||||
break;
|
||||
|
||||
while (slot && slot != idx_znode) {
|
||||
#if 0
|
||||
if (nodes [slot].flags & ZOF_VISIBLE) {
|
||||
ExcludeClipRect (HDC_SCREEN_SYS, &nodes [slot].rc);
|
||||
}
|
||||
#endif
|
||||
/* houhh 20090730, if slot window is no regular.*/
|
||||
if (nodes [slot].flags & ZOF_VISIBLE) {
|
||||
if (nodes[slot].idx_mask_rect == 0) {
|
||||
@@ -3416,7 +3404,6 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
slot = nodes [slot].next;
|
||||
}
|
||||
|
||||
BitBlt (HDC_SCREEN_SYS, rcOld.left, rcOld.top,
|
||||
MIN (RECTWP (rcWin), RECTW (rcOld)),
|
||||
MIN (RECTHP (rcWin), RECTH (rcOld)),
|
||||
@@ -3430,22 +3417,17 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
#endif
|
||||
|
||||
do_for_all_znodes (&rcOld, zi, _cb_update_znode, ZT_ALL);
|
||||
/* unlock zi for change ... */
|
||||
unlock_zi_for_change (zi);
|
||||
|
||||
if (nodes [0].flags & ZOF_IF_REFERENCE) {
|
||||
SendMessage (HWND_DESKTOP,
|
||||
MSG_ERASEDESKTOP, 0, (LPARAM)&rcOld);
|
||||
nodes [0].flags &= ~ZOF_IF_REFERENCE;
|
||||
}
|
||||
|
||||
/* check the invalid rectangles of the being moved window */
|
||||
/* check the invalid rect of the window */
|
||||
EmptyClipRgn (&sg_UpdateRgn);
|
||||
nInvCount = SubtractRect (rcInv, &rcOld, &rcScr);
|
||||
for (i = 0; i < nInvCount; i++) {
|
||||
AddClipRect (&sg_UpdateRgn, rcInv + i);
|
||||
}
|
||||
|
||||
/* Since 5.0.0: handle levels above the current level */
|
||||
/* Since 5.0.0: handle levels */
|
||||
for (level = 0; level < NR_ZORDER_LEVELS; level++) {
|
||||
if (type < _zof_types_for_level[level]) {
|
||||
slot = zi->first_in_levels[level];
|
||||
@@ -3457,7 +3439,6 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
}
|
||||
}
|
||||
|
||||
/* handle znodes above the current znode */
|
||||
slot = *first;
|
||||
for (; slot != idx_znode; slot = nodes [slot].next) {
|
||||
if (nodes [slot].flags & ZOF_VISIBLE &&
|
||||
@@ -3465,15 +3446,20 @@ static int dskMoveWindow (int cli, int idx_znode, HDC memdc, const RECT* rcWin)
|
||||
AddClipRect(&sg_UpdateRgn, &rcInter);
|
||||
}
|
||||
|
||||
do_for_all_znodes (&rcOld, zi, _cb_update_znode, ZT_ALL);
|
||||
|
||||
if (nodes [0].flags & ZOF_IF_REFERENCE) {
|
||||
SendMessage (HWND_DESKTOP,
|
||||
MSG_ERASEDESKTOP, 0, (LPARAM)&rcOld);
|
||||
nodes [0].flags &= ~ZOF_IF_REFERENCE;
|
||||
}
|
||||
|
||||
OffsetRegion (&sg_UpdateRgn,
|
||||
rcWin->left - rcOld.left,
|
||||
rcWin->top - rcOld.top);
|
||||
|
||||
update_client_window_rgn (nodes [idx_znode].cli,
|
||||
nodes [idx_znode].hwnd);
|
||||
|
||||
/* unlock zi for change ... */
|
||||
unlock_zi_for_change (zi);
|
||||
}
|
||||
else {
|
||||
lock_zi_for_change (zi);
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef _MGUSE_SHMOPEN
|
||||
#include <sys/mman.h>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define _DEBUG
|
||||
#include "common.h"
|
||||
|
||||
#ifdef _MGGAL_DRM
|
||||
@@ -2004,7 +2005,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer(DrmVideoData* vdata,
|
||||
surface_buffer->handle,
|
||||
surface_buffer->width, surface_buffer->height,
|
||||
surface_buffer->pitch,
|
||||
surface_buffer->size, surface_buffer->offset);
|
||||
(long unsigned int)surface_buffer->size, (long unsigned int)surface_buffer->offset);
|
||||
|
||||
/* prepare buffer for memory mapping */
|
||||
memset(&mreq, 0, sizeof(mreq));
|
||||
@@ -2133,7 +2134,7 @@ static DrmSurfaceBuffer *drm_create_dumb_buffer_from_prime_fd(DrmVideoData* vdat
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", size);
|
||||
_DBG_PRINTF("size got by calling lseek: %lu\n", (long unsigned int)size);
|
||||
}
|
||||
|
||||
ret = drmPrimeFDToHandle (vdata->dev_fd, prime_fd, &handle);
|
||||
@@ -3492,7 +3493,7 @@ GAL_Surface* __drm_create_surface_from_name (GHANDLE video,
|
||||
|
||||
/* called by drmCreateDCFromHandle */
|
||||
GAL_Surface* __drm_create_surface_from_handle (GHANDLE video, uint32_t handle,
|
||||
unsigned long size, uint32_t drm_format, uint32_t pixels_off,
|
||||
size_t size, uint32_t drm_format, uint32_t pixels_off,
|
||||
uint32_t width, uint32_t height, uint32_t pitch)
|
||||
{
|
||||
GAL_VideoDevice *this = (GAL_VideoDevice *)video;
|
||||
|
||||
@@ -257,11 +257,9 @@ static int FB_EnterGraphicsMode (_THIS)
|
||||
_WRN_PRINTF ("Can't open %s: %m\n", tty_dev);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (ioctl (ttyfd, KDSETMODE, KD_GRAPHICS) == -1) {
|
||||
_WRN_PRINTF ("Error when setting the terminal (%s) "
|
||||
"to graphics mode: %m\n", tty_dev);
|
||||
_WRN_PRINTF ("It might is not a console.\n");
|
||||
_WRN_PRINTF ("Error when setting the terminal to graphics mode: %m\n");
|
||||
_WRN_PRINTF ("Maybe is not a console.\n");
|
||||
goto fail;
|
||||
}
|
||||
#ifdef _MGRM_PROCESSES
|
||||
@@ -866,8 +864,7 @@ static void FB_FreeHWSurfaces(_THIS)
|
||||
surfaces.next = NULL;
|
||||
}
|
||||
|
||||
static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request,
|
||||
REP_HWSURFACE* reply)
|
||||
static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request, REP_HWSURFACE* reply)
|
||||
{
|
||||
if (request->bucket == NULL) { /* alloc hw surface */
|
||||
vidmem_bucket *bucket;
|
||||
@@ -957,9 +954,9 @@ static void FB_RequestHWSurface (_THIS, const REQ_HWSURFACE* request,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bucket && bucket->used) {
|
||||
/* Add the memory back to the total */
|
||||
_DBG_PRINTF ("Freeing bucket of %d bytes\n", bucket->size);
|
||||
surfaces_memleft += bucket->size;
|
||||
|
||||
/* Can we merge the space with surrounding buckets? */
|
||||
@@ -1018,14 +1015,12 @@ static int FB_AllocHWSurface (_THIS, GAL_Surface *surface)
|
||||
surface->pitch = reply.pitch;
|
||||
surface->pixels = mapped_mem + reply.offset;
|
||||
surface->hwdata = (struct private_hwdata *)reply.bucket;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void FB_FreeHWSurface(_THIS, GAL_Surface *surface)
|
||||
{
|
||||
REQ_HWSURFACE request = {surface->w, surface->h, surface->pitch, 0,
|
||||
surface->hwdata};
|
||||
REQ_HWSURFACE request = {surface->w, surface->h, surface->pitch, 0, surface->hwdata};
|
||||
REP_HWSURFACE reply = {0, 0};
|
||||
|
||||
request.offset = (char*)surface->pixels - (char*)mapped_mem;
|
||||
|
||||
+2
-2
@@ -219,7 +219,7 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
|
||||
screen->format->BitsPerPixel,
|
||||
screen->format->Rmask, screen->format->Gmask,
|
||||
screen->format->Bmask, screen->format->Amask);
|
||||
_DBG_PRINTF ("GAL_CreateSharedRGBSurface: map size: %lu, fd: %d, RGBAmasks: %x, %x, %x, %x\n",
|
||||
_WRN_PRINTF ("GAL_CreateSharedRGBSurface: map size: %lu, fd: %d, RGBAmasks: %x, %x, %x, %x\n",
|
||||
wp_surf->shared_header->map_size, wp_surf->shared_header->fd,
|
||||
wp_surf->format->Rmask, wp_surf->format->Gmask,
|
||||
wp_surf->format->Bmask, wp_surf->format->Amask);
|
||||
@@ -243,7 +243,7 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
|
||||
&info, sizeof (SHAREDSURFINFO), &fd) < 0) || (fd < 0))
|
||||
goto empty;
|
||||
|
||||
_DBG_PRINTF ("REQID_GETSHAREDSURFACE: size (%lu), flags (0x%x), fd: %d\n",
|
||||
_WRN_PRINTF ("REQID_GETSHAREDSURFACE: size (%lu), flags (0x%x), fd: %d\n",
|
||||
info.size, info.flags, fd);
|
||||
wp_surf = GAL_AttachSharedRGBSurface (fd, info.size,
|
||||
info.flags, TRUE);
|
||||
|
||||
@@ -269,8 +269,6 @@ static void PCXVFB_UpdateRects (_THIS, int numrects, GAL_Rect *rects)
|
||||
|
||||
static BOOL PCXVFB_SyncUpdate (_THIS)
|
||||
{
|
||||
RECT dirty_rc;
|
||||
|
||||
if (IsRectEmpty (&this->hidden->dirty_rc))
|
||||
return FALSE;
|
||||
|
||||
@@ -280,16 +278,6 @@ static BOOL PCXVFB_SyncUpdate (_THIS)
|
||||
shm_lock(semid);
|
||||
#endif
|
||||
|
||||
dirty_rc.left = this->hidden->hdr->dirty_rc_l;
|
||||
dirty_rc.top = this->hidden->hdr->dirty_rc_t;
|
||||
dirty_rc.right = this->hidden->hdr->dirty_rc_r;
|
||||
dirty_rc.bottom = this->hidden->hdr->dirty_rc_b;
|
||||
if (dirty_rc.right == -1) dirty_rc.right = 0;
|
||||
if (dirty_rc.bottom == -1) dirty_rc.bottom = 0;
|
||||
|
||||
GetBoundRect (&this->hidden->dirty_rc, &dirty_rc,
|
||||
&this->hidden->dirty_rc);
|
||||
|
||||
shadowScreen_BlitToReal (this);
|
||||
|
||||
this->hidden->hdr->dirty_rc_l = this->hidden->dirty_rc.left;
|
||||
|
||||
+2
-8
@@ -628,13 +628,6 @@ void GAL_SetVideoModeInfo(GAL_Surface* screen)
|
||||
{
|
||||
assert(screen);
|
||||
|
||||
if (GAL_VideoSurface) {
|
||||
GAL_Surface *ready_to_go;
|
||||
ready_to_go = GAL_VideoSurface;
|
||||
GAL_VideoSurface = NULL;
|
||||
GAL_FreeSurface (ready_to_go);
|
||||
}
|
||||
|
||||
GAL_VideoSurface = screen;
|
||||
__mg_current_video->info.vfmt = __gal_screen->format;
|
||||
__mg_current_video->offset_x = 0;
|
||||
@@ -824,7 +817,6 @@ static inline void add_rects_to_update_region (CLIPRGN* region,
|
||||
rc.bottom = rects[i].y + rects[i].h;
|
||||
AddClipRect (region, &rc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GAL_UpdateRects (GAL_Surface *surface, int numrects, GAL_Rect *rects)
|
||||
@@ -930,6 +922,8 @@ BOOL GAL_SyncUpdate (GAL_Surface *surface)
|
||||
if (this->SyncUpdate) {
|
||||
rc = this->SyncUpdate (this);
|
||||
}
|
||||
|
||||
_DBG_PRINTF ("%d rects updated\n", numrects);
|
||||
}
|
||||
|
||||
EmptyClipRgn (&surface->update_region);
|
||||
|
||||
Reference in New Issue
Block a user