VirtualBox

Changeset 64644 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 10, 2016 5:07:59 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:5978: X11: Hide UIMiniToolBar from task-bar and pager.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

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

    r64433 r64644  
    33853385    Atom net_wm_state_fullscreen = XInternAtom(pDisplay, "_NET_WM_STATE_FULLSCREEN", True /* only if exists */);
    33863386
    3387     /* Append resultNetWmState with full-screen flag if necessary: */
     3387    /* Append resultNetWmState with fullscreen flag if necessary: */
    33883388    if (!resultNetWmState.contains(net_wm_state_fullscreen))
    33893389    {
    33903390        resultNetWmState.append(net_wm_state_fullscreen);
     3391        /* Apply property to widget again: */
     3392        XChangeProperty(pDisplay, pWidget->window()->winId(),
     3393                        net_wm_state, XA_ATOM, 32, PropModeReplace,
     3394                        (unsigned char*)resultNetWmState.data(), resultNetWmState.size());
     3395    }
     3396}
     3397
     3398/* static */
     3399void VBoxGlobal::setSkipTaskBarFlag(QWidget *pWidget)
     3400{
     3401    /* Get display: */
     3402    Display *pDisplay = QX11Info::display();
     3403
     3404    /* Prepare atoms: */
     3405    QVector<Atom> resultNetWmState = flagsNetWmState(pWidget);
     3406    Atom net_wm_state = XInternAtom(pDisplay, "_NET_WM_STATE", True /* only if exists */);
     3407    Atom net_wm_state_skip_taskbar = XInternAtom(pDisplay, "_NET_WM_STATE_SKIP_TASKBAR", True /* only if exists */);
     3408
     3409    /* Append resultNetWmState with skip-taskbar flag if necessary: */
     3410    if (!resultNetWmState.contains(net_wm_state_skip_taskbar))
     3411    {
     3412        resultNetWmState.append(net_wm_state_skip_taskbar);
     3413        /* Apply property to widget again: */
     3414        XChangeProperty(pDisplay, pWidget->window()->winId(),
     3415                        net_wm_state, XA_ATOM, 32, PropModeReplace,
     3416                        (unsigned char*)resultNetWmState.data(), resultNetWmState.size());
     3417    }
     3418}
     3419
     3420/* static */
     3421void VBoxGlobal::setSkipPagerFlag(QWidget *pWidget)
     3422{
     3423    /* Get display: */
     3424    Display *pDisplay = QX11Info::display();
     3425
     3426    /* Prepare atoms: */
     3427    QVector<Atom> resultNetWmState = flagsNetWmState(pWidget);
     3428    Atom net_wm_state = XInternAtom(pDisplay, "_NET_WM_STATE", True /* only if exists */);
     3429    Atom net_wm_state_skip_pager = XInternAtom(pDisplay, "_NET_WM_STATE_SKIP_PAGER", True /* only if exists */);
     3430
     3431    /* Append resultNetWmState with skip-pager flag if necessary: */
     3432    if (!resultNetWmState.contains(net_wm_state_skip_pager))
     3433    {
     3434        resultNetWmState.append(net_wm_state_skip_pager);
    33913435        /* Apply property to widget again: */
    33923436        XChangeProperty(pDisplay, pWidget->window()->winId(),
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r64334 r64644  
    398398    /** X11: Sets _NET_WM_STATE_FULLSCREEN flag for passed @a pWidget. */
    399399    static void setFullScreenFlag(QWidget *pWidget);
     400    /** X11: Sets _NET_WM_STATE_SKIP_TASKBAR flag for passed @a pWidget. */
     401    static void setSkipTaskBarFlag(QWidget *pWidget);
     402    /** X11: Sets _NET_WM_STATE_SKIP_PAGER flag for passed @a pWidget. */
     403    static void setSkipPagerFlag(QWidget *pWidget);
    400404#endif /* VBOX_WS_X11 */
    401405
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp

    r64643 r64644  
    800800    /* Adjust geometry first time: */
    801801    adjustGeometry();
     802
     803    /* Hide mini-toolbar from taskbar and pager: */
     804    vboxGlobal().setSkipTaskBarFlag(this);
     805    vboxGlobal().setSkipPagerFlag(this);
    802806}
    803807
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