Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8616075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:31:57+00:00 2026-06-12T05:31:57+00:00

I made an app called Uberlayer . Users can use this single-purpose Mac app

  • 0

I made an app called Uberlayer. Users can use this single-purpose Mac app to overlay images on top of other applications.

I am using setMovableByWindowBackground to enable dragging the whole window by it’s background.

There is a little improvement I would love to make, as the application is now you can’t drag the window higher than the menubar, which can be little bit anoying. With normal window I can imagine it’s a good thing to have it lock to the Menubar, but for this use case it would be a good thing to be able to drag it higher.

Anyone knows how you can change this default window behavior?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:31:59+00:00Added an answer on June 12, 2026 at 5:31 am

    Instead using -setMovableByWindowBackground: override -mouseDown: event like this:

    - (void)mouseDown:(NSEvent *)event
    {
        NSPoint originalMouseLocation = [window convertBaseToScreen:[event locationInWindow]];
        NSRect originalFrame = [window frame];
    
        while (YES)
        {
            NSEvent *newEvent = [window nextEventMatchingMask:(NSLeftMouseDraggedMask | NSLeftMouseUpMask)];
    
            if ([newEvent type] == NSLeftMouseUp)
            {
                break;
            }
    
            NSPoint newMouseLocation = [window convertBaseToScreen:[newEvent locationInWindow]];
            NSPoint delta = NSMakePoint(
                                        newMouseLocation.x - originalMouseLocation.x,
                                        newMouseLocation.y - originalMouseLocation.y);
    
            NSRect newFrame = originalFrame;
    
            newFrame.origin.x += delta.x;
            newFrame.origin.y += delta.y;
    
            [window setFrame:newFrame display:YES animate:NO];
        }
    }
    

    ** Do not forget to hide window’s title bar (select window -> go to Attributes Inspector -> uncheck Title Bar ) because with it window can’t go higher than menubar. Or other solution would be to create borderless window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a main branch with a file called app.js . I made changes
i made an app in architect. My store is this Ext.define('MyApp.store.storeMain', { extend: 'Ext.data.Store',
So I have this custom object i made called 'Box', it's throwing the error
Okay, this is pretty weird. I made an app that listens for changes inside
I created a single view universal app, and made sure that the method shouldAutorotateToInterfaceOrientation
With the help of this tutorial i have made an app that has 3
I have a native iOS app that can be called from Mobile Safari in
I made a management app imaginitively called update . The following work fine from
I made a xfire client for mac (called BlackFire -> http://www.macxfire.com ) and it
I am adding ajax to this little list web app I made. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.