Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Shadow problem after hiding/removing window decorations. ( Linux )
Forum Updated to NodeBB v4.3 + New Features

Shadow problem after hiding/removing window decorations. ( Linux )

Scheduled Pinned Locked Moved General and Desktop
6 Posts 4 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    majster
    wrote on last edited by
    #1

    Hello everyone!
    I'm new to Qt and to this forum.

    I start playing around with Qt few months ago and I faced fallowing problem,

    I tried to hide window decorations ( I fallow this post "here":http://stackoverflow.com/questions/11775840/how-can-i-remove-borders-from-a-windows-qml-application ) and all works well apart form the fact that shadow are much thinner then on the same app but with system window decorations.
    It do not makes much different for me but designer I'm working on wants me to fix it and now I just run out of ideas.

    Shadow with system decoration:
    !http://ubuntuone.com/2iuN9WIIeHwCq8gQ5FaoHo(With decoration)!

    Shadow without decoration:
    !http://ubuntuone.com/4dbSOLJpMeCdGFaWD63Xif(Without decoration)!

    What I notices is that when decorations are hidden then shadow is the same as in the window which do NOT have currently focus.
    So it looks like when I hide decorations then application do not have focus and this is why shadow is thinner/lighter.

    Any ideas how to fix it ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I don't want to be 100% affirmative, but it looks more like a window manager kind of "problem". The window manager being responsible for drawing the widgets/shadow/etc... I don't think that you can do much from Qt about that (but I would happy to be proven wrong)

      You might want to try also asking on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        majster
        wrote on last edited by
        #3

        Thank you for taking a time to respond to my post.
        It sounds like you are right... window manager "problem"

        I did few more tests and it turnout that there is no shadow on Gnome shell, and there is light shadow on Gnome fall-back mode ( same as on Unity ).
        I did send this message to mailing list as you suggested.

        Thanks for your help once again.
        Szymon
        [quote author="SGaist" date="1375565591"]Hi and welcome to devnet,

        I don't want to be 100% affirmative, but it looks more like a window manager kind of "problem". The window manager being responsible for drawing the widgets/shadow/etc... I don't think that you can do much from Qt about that (but I would happy to be proven wrong)

        You might want to try also asking on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented)[/quote]

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Don't forget to update this thread with any relevant information you might get so other users may reduce their search time if getting hit by the same problem :)

          Happy coding !

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zeFree
            wrote on last edited by
            #5

            I answered a similar question "here":http://stackoverflow.com/a/15757358/1082289 about adding a shadow to a frameless window in Qt. May be you can use the same hack to solve this problem as well. : )

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              zavyalov
              wrote on last edited by
              #6

              Hi,

              updated just noticed this topis is about Linux version.

              recently experienced similar issue with shadow decoration on Mac OS. And as already stated it is due to windows manager.

              Please see:
              @
              /// https://qt.gitorious.org/qt/qt/source/57756e72adf2081137b97f0e689dd16c770d10b1:src/gui/kernel/qwidget_mac.mm#L4905

              void QWidgetPrivate::finishCocoaMaskSetup()
              {
              // skipped
              if (q->isWindow()) {
              NSWindow *window = qt_mac_window_for(q);
              [window setOpaque:(extra->imageMask == 0)];
              [window invalidateShadow];
              }
              }
              @

              On Cocoa based GUI after widget has been hidden need to invalidate shadow.

              'setMask' on main widget should make a trick. Or (hack) expose a function that will do that for you as
              @
              // already available through Qt Gui:
              OSWindowRef window = qt_mac_window_for(w);
              @

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved