Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Contraining a window position (X,Y) in X
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
bour...@gmail.com  
View profile  
 More options Mar 15 2012, 9:38 am
Newsgroups: comp.windows.x
From: bour...@gmail.com
Date: Thu, 15 Mar 2012 06:38:18 -0700 (PDT)
Local: Thurs, Mar 15 2012 9:38 am
Subject: Contraining a window position (X,Y) in X
Hello Xers,

Got a simple problem for which I'm trying to find a good solution.  I have two applications running on 1 workstation.  This workstation is configured with two displays.  What I'm trying to accomplish is to constrain the positions of the windows from one of my apps to one of the displays.  No problem figuring out the displayable area, the problem I'm having is enforcing it.

Currently the windows are all top level shells (need the ability to iconify windows).  I am using MWM as my window manager and I'm running Motif 1.2.

So right now I have an event handler which subscribes to the StuctureNotifyMask and I get configureNotify eventS on the windowS.  Seeing how I am using a window manager I cannot preemptively stop a window from moving outside the viewable area (wish there was a XmNminX and XmNminY resource).  So I'm stuck with having to move the window post the window manager actually moving the window.  This is OK for the most part, but because I have the Mwm*moveOpaque value set I receive several configureNotify events when the window is being moved by the user.  When it begins to move outside the acceptable area (user dragging the window), I start to try and move it to the proper area and then things go bad in a hurry (my app setting calculating correct positions and the user is still moving the window).

I'm I missing something here?  It is difficult to figure out when the drag move starts and stops (add button handlers (but don't get notified of MB1 clicks on the window titlebar), motionnotify events and try and set global window states) and the configureNotify events don't contain that information.  Things are compounded when the user resizes the window outside of the viewing area...

I've searched online and have found a couple of threads where people were trying to do the same thing, but never any concrete solution.

Please, if you've done this in the past or have some ideas for me I would be very appreciative.

Thanks,
Keith.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »