VirtualBox

Changeset 6970 in vbox


Ignore:
Timestamp:
Feb 15, 2008 1:04:24 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
28149
Message:

Additions/X11: first attempt at dynamic guest resizing

Location:
trunk/src/VBox/Additions/x11/xclient
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/xclient/Makefile.kmk

    r6756 r6970  
    2929VBoxClient_SOURCES = \
    3030        main.cpp
    31 if1of ($(BUILD_TARGET),linux l4) ## @todo use clipboard-new.cpp everywhere.
    32  VBoxClient_SOURCES += \
    33         clipboard.cpp
    34 else
    35  VBoxClient_SOURCES += \
     31VBoxClient_SOURCES += \
    3632        clipboard-new.cpp
    37 endif
    3833VBoxClient_LIBPATH = \
    3934        $(VBOX_LIBPATH32_X11)
     
    4540        Xt
    4641ifdef VBOX_X11_SEAMLESS_GUEST
    47  VBoxClient_DEFS += SEAMLESS_X11
     42 VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE
    4843 VBoxClient_SOURCES += \
    4944        seamless-host.cpp \
    5045        seamless-x11.cpp \
    51         thread.cpp
     46        thread.cpp \
     47        displaychange-x11.cpp
    5248 VBoxClient_LIBS += \
    5349        Xext
  • trunk/src/VBox/Additions/x11/xclient/main.cpp

    r6969 r6970  
    3636#include "clipboard.h"
    3737
    38 #ifdef SEAMLESS_X11
    39 # include "seamless.h"
     38#ifdef DYNAMIC_RESIZE
     39# include "displaychange.h"
     40# ifdef SEAMLESS_GUEST
     41#  include "seamless.h"
     42# endif
    4043#endif
    4144
     
    110113{
    111114    int rcClipboard, rc;
    112 #ifdef SEAMLESS_X11
    113     /** Our instance of the seamless class. */
     115#ifdef DYNAMIC_RESIZE
     116    VBoxGuestDisplayChangeMonitor displayChange;
     117# ifdef SEAMLESS_GUEST
     118    /** Our instance of the seamless class.  This only makes sense if dynamic resizing
     119        is enabled. */
    114120    VBoxGuestSeamless seamless;
    115 #endif
     121# endif /* SEAMLESS_GUEST defined */
     122#endif /* DYNAMIC_RESIZE */
    116123
    117124    /* Parse our option(s) */
     
    184191    }
    185192#endif  /* VBOX_X11_CLIPBOARD defined */
    186 #ifdef SEAMLESS_X11
    187193    try
    188194    {
    189         LogRel(("VBoxClient: starting seamless Guest Additions...\n"));
    190         rc = seamless.init();
     195#ifdef DYNAMIC_RESIZE
     196        LogRel(("VBoxClient: starting dynamic guest resizing...\n"));
     197        rc = displayChange.init();
    191198        if (RT_FAILURE(rc))
    192199        {
    193             LogRel(("VBoxClient: failed to initialise seamless Additions, rc = %Rrc\n", rc));
    194         }
     200            LogRel(("VBoxClient: failed to start dynamic guest resizing, rc = %Rrc\n", rc));
     201        }
     202# ifdef SEAMLESS_GUEST
     203        if (RT_SUCCESS(rc))
     204        {
     205            LogRel(("VBoxClient: starting seamless Guest Additions...\n"));
     206            rc = seamless.init();
     207            if (RT_FAILURE(rc))
     208            {
     209                LogRel(("VBoxClient: failed to start seamless Additions, rc = %Rrc\n", rc));
     210            }
     211        }
     212# endif /* SEAMLESS_GUEST defined */
     213#endif /* DYNAMIC_RESIZE defined */
    195214    }
    196215    catch (std::exception e)
     
    204223        rc = VERR_UNRESOLVED_ERROR;
    205224    }
    206 #endif /* SEAMLESS_X11 defined */
    207225#ifdef VBOX_X11_CLIPBOARD
    208226    if (RT_SUCCESS(rcClipboard))
     
    217235    LogRel(("VBoxClient: exiting...\n"));
    218236#endif  /* VBOX_X11_CLIPBOARD not defined */
    219 #ifdef SEAMLESS_X11
    220237    try
    221238    {
     239#ifdef DYNAMIC_RESIZE
     240        displayChange.uninit();
     241# ifdef SEAMLESS_GUEST
    222242        seamless.uninit();
     243# endif /* SEAMLESS_GUEST defined */
     244#endif /* DYNAMIC_RESIZE defined */
    223245    }
    224246    catch (std::exception e)
     
    232254        rc = VERR_UNRESOLVED_ERROR;
    233255    }
    234 #endif /* SEAMLESS_X11 defined */
    235256    VbglR3Term();
    236257    return RT_SUCCESS(rc) ? 0 : 1;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette