VirtualBox

Changeset 64336 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 20, 2016 3:16:06 PM (8 years ago)
Author:
vboxsync
Message:

bugref:8631: FE/Qt: resizing problems with tiled window manager: include some ICCCM definitions directly to build on systems without xcb_icccm.h.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r64334 r64336  
    5151#  include <QScreen>
    5252#  include <xcb/xcb.h>
    53 #  include <xcb/xcb_icccm.h>
    5453# endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */
    5554
     
    37053704}
    37063705
     3706typedef struct {
     3707/** User specified flags */
     3708uint32_t flags;
     3709/** User-specified position */
     3710int32_t x, y;
     3711/** User-specified size */
     3712int32_t width, height;
     3713/** Program-specified minimum size */
     3714int32_t min_width, min_height;
     3715/** Program-specified maximum size */
     3716int32_t max_width, max_height;
     3717/** Program-specified resize increments */
     3718int32_t width_inc, height_inc;
     3719/** Program-specified minimum aspect ratios */
     3720int32_t min_aspect_num, min_aspect_den;
     3721/** Program-specified maximum aspect ratios */
     3722int32_t max_aspect_num, max_aspect_den;
     3723/** Program-specified base size */
     3724int32_t base_width, base_height;
     3725/** Program-specified window gravity */
     3726uint32_t win_gravity;
     3727} xcb_size_hints_t;
     3728
    37073729/* static */
    37083730void VBoxGlobal::setTopLevelGeometry(QWidget *pWidget, int x, int y, int w, int h)
     
    37243746                             fMask, values);
    37253747        xcb_size_hints_t hints;
    3726         hints.flags = XCB_ICCCM_SIZE_HINT_US_POSITION | XCB_ICCCM_SIZE_HINT_US_SIZE;
     3748        hints.flags =   1 /* XCB_ICCCM_SIZE_HINT_US_POSITION */
     3749                      | 2 /* XCB_ICCCM_SIZE_HINT_US_SIZE */;
    37273750        hints.x          = x;
    37283751        hints.y          = y;
     
    37343757        hints.max_height = pWidget->maximumSize().height();
    37353758        if (hints.min_width > 0 || hints.min_height > 0)
    3736             hints.flags |= XCB_ICCCM_SIZE_HINT_P_MIN_SIZE;
     3759            hints.flags |= 16 /* XCB_ICCCM_SIZE_HINT_P_MIN_SIZE */;
    37373760        if (hints.max_width < QWINDOWSIZE_MAX || hints.max_height < QWINDOWSIZE_MAX)
    3738             hints.flags |= XCB_ICCCM_SIZE_HINT_P_MAX_SIZE;
     3761            hints.flags |= 32 /* XCB_ICCCM_SIZE_HINT_P_MAX_SIZE */;
    37393762        xcb_change_property(QX11Info::connection(), XCB_PROP_MODE_REPLACE,
    37403763                            (xcb_window_t)pWidget->winId(), XCB_ATOM_WM_NORMAL_HINTS,
Note: See TracChangeset for help on using the changeset viewer.

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