Loading ...
Sorry, an error occurred while loading the content.

Re: fullscreen problem on second monitor

Expand Messages
  • Ted Pavlic
    Note: It s nice that the second screen *doesn t* go all black. That (in theory) should let me put Skim in full screen on monitor 2 and Vim in full screen on
    Message 1 of 7 , Jan 7, 2008
    • 0 Attachment
      Note: It's nice that the second screen *doesn't* go all black. That (in
      theory) should let me put Skim in full screen on monitor 2 and Vim in
      full screen on monitor 1 (for my LaTeX editing).

      --Ted

      Nico Weber wrote:
      > Hi,
      >
      >> I notice that when I do:
      >>
      >> :set fullscreen
      >>
      >> on my second monitor, MacVim disappears. When I use Expose to show all
      >> of the applications, it seems to fly in from way off on the right-hand
      >> side of the monitor. I can still type ":set nofullscreen" to make it
      >> appear again, but the screen is gone.
      >
      > I see the problem, and it's easy to fix (hooray). I'll add some
      > related things (don't hide menubar/dock if fullscreen is activated on
      > a secondary screen for example) and send out a patch.
      >
      > Thanks for the report.
      >
      > Nico
      >
      > >
      >

      --
      Ted Pavlic <ted@...>

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Nico Weber
      ... Sure. That s not changed. The patch is at the end of this mail. I can t figure out how to get git-send-email to work. Can someone help me with that? Bye,
      Message 2 of 7 , Jan 7, 2008
      • 0 Attachment
        > Note: It's nice that the second screen *doesn't* go all black. That
        > (in
        > theory) should let me put Skim in full screen on monitor 2 and Vim in
        > full screen on monitor 1 (for my LaTeX editing).

        Sure. That's not changed.

        The patch is at the end of this mail.

        I can't figure out how to get git-send-email to work. Can someone help
        me with that?

        Bye,
        Nico

        From e96469fb62cbea59a3726d4e90740d2c671e3494 Mon Sep 17 00:00:00 2001
        From: Nicolas Weber <nicolasweber@...>
        Date: Mon, 7 Jan 2008 16:59:52 +0100
        Subject: [PATCH] fix fullscreen mode for secondary monitors

        ---
        src/MacVim/MMFullscreenWindow.m | 64 ++++++++++++++++++++++++++++++
        ++++++--
        1 files changed, 60 insertions(+), 4 deletions(-)

        diff --git a/src/MacVim/MMFullscreenWindow.m b/src/MacVim/
        MMFullscreenWindow.m
        index fe78167..2955f24 100644
        --- a/src/MacVim/MMFullscreenWindow.m
        +++ b/src/MacVim/MMFullscreenWindow.m
        @@ -23,6 +23,14 @@
        #import <Carbon/Carbon.h>


        +static int numFullscreenWindows = 0;
        +
        +@interface MMFullscreenWindow (Private)
        +- (void)centerView;
        +- (BOOL)isOnPrimaryScreen;
        +- (void)hideDockIfAppropriate;
        +- (void)revealDockIfAppropriate;
        +@end

        @implementation MMFullscreenWindow

        @@ -40,7 +48,10 @@
        styleMask:NSBorderlessWindowMask
        backing:NSBackingStoreBuffered
        defer:YES
        - screen:screen];
        + // since we're passing [screen frame]
        above,
        + // we want the content rect to be
        relative to
        + // the main screen (ie, pass nil for
        screen).
        + screen:nil];

        if (self == nil)
        return nil;
        @@ -76,8 +87,7 @@

        - (void)enterFullscreen
        {
        - // hide menu and dock, both appear on demand
        - SetSystemUIMode(kUIModeAllSuppressed, 0); //requires 10.3
        + [self hideDockIfAppropriate];

        // fade to black
        Boolean didBlend = NO;
        @@ -177,8 +187,54 @@
        CGReleaseDisplayFadeReservation(token);
        }

        + [self revealDockIfAppropriate];
        +}
        +
        +- (BOOL)isOnPrimaryScreen
        +{
        + // The primary screen is the screen the menu bar is on. This is
        different
        + // from [NSScreen mainScreen] (which returns the screen
        containing the
        + // key window).
        + NSArray *screens = [NSScreen screens];
        + if (screens == nil || [screens count] < 1)
        + return NO;
        +
        + return [self screen] == [screens objectAtIndex:0];
        +}
        +
        +- (void)hideDockIfAppropriate
        +{
        + // Hide menu and dock, both appear on demand.
        + //
        + // Don't hide the dock if going fullscreen on a non-primary
        screen. Also,
        + // if there are several fullscreen windows on the primary screen,
        only
        + // hide dock and friends for the first fullscreen window (and
        display
        + // them again after the last fullscreen window has been closed).
        + //
        + // Another way to deal with several fullscreen windows would be
        to hide/
        + // reveal the dock each time a fullscreen window gets/loses
        focus, but
        + // this way it's less distracting.
        +
        + // XXX: If you have a fullscreen window on a secondary monitor
        and unplug
        + // the monitor, this will probably not work right.
        +
        + if ([self isOnPrimaryScreen]) {
        + if (numFullscreenWindows == 0) {
        + SetSystemUIMode(kUIModeAllSuppressed, 0); //requires 10.3
        + }
        + ++numFullscreenWindows;
        + }
        +}
        +
        +- (void)revealDockIfAppropriate
        +{
        // order menu and dock back in
        - SetSystemUIMode(kUIModeNormal, 0);
        + if ([self isOnPrimaryScreen]) {
        + --numFullscreenWindows;
        + if (numFullscreenWindows == 0) {
        + SetSystemUIMode(kUIModeNormal, 0);
        + }
        + }
        }

        // Title-less windows normally don't receive key presses, override
        this
        --
        1.5.3.4



        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • björn
        ... I have applied it and pushed it to the pulic repo, please check that it works (I encountered some problems, see below). ... I also can t get this to
        Message 3 of 7 , Jan 7, 2008
        • 0 Attachment
          On 07/01/2008, Nico Weber <nicolasweber@...> wrote:
          >
          > > Note: It's nice that the second screen *doesn't* go all black. That
          > > (in
          > > theory) should let me put Skim in full screen on monitor 2 and Vim in
          > > full screen on monitor 1 (for my LaTeX editing).
          >
          > Sure. That's not changed.
          >
          > The patch is at the end of this mail.

          I have applied it and pushed it to the pulic repo, please check that
          it works (I encountered some problems, see below).

          >
          > I can't figure out how to get git-send-email to work. Can someone help
          > me with that?

          I also can't get this to work...I remember you posting something about
          this before and as far as I can remember I get the same error message
          you did. I think you have to configure sendmail, but I'm not sure.

          Anyway, until you get that sorted you'd better just attach your
          patches (e.g. as tar.gz). The current patch had line-break problems,
          and it seemed like some spurious spaces had been inserted at the
          beginning of some lines. In any case, I could not get it to apply, so
          I had to do it manually...so please check extra carefully that the
          public version works. :-)


          Thanks for the patch,
          Björn

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Nico Weber
          ... Seems to work fine. ... Nico --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_mac maillist. For more
          Message 4 of 7 , Jan 7, 2008
          • 0 Attachment
            > I have applied it and pushed it to the pulic repo, please check that
            > it works (I encountered some problems, see below).

            Seems to work fine.

            >
            Nico

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Ben Schmidt
            ... My guess is that Postfix needs to be set up. A *very* sketchy set of instructions which pretty much all has to be done as root: (1) edit
            Message 5 of 7 , Jan 9, 2008
            • 0 Attachment
              > I can't figure out how to get git-send-email to work. Can someone help
              > me with that?



              My guess is that Postfix needs to be set up. A *very* sketchy set of instructions
              which pretty much all has to be done as root:



              (1) edit /etc/postfix/main.cf so it has these directives uncommented an
              appropriately set:

              myhostname = your_machines_hostname

              relayhost = your_isp_mail_server
              smtp_sasl_auth_enable = yes
              smtp_sasl_password_maps = hash:/etc/postfix/smtppasswd
              smtp_sasl_security_options =

              sender_canonical_maps = hash:/etc/postfix/senders



              (2) edit /etc/postfix/senders and add

              your_username your_real_email_address

              as a line in it.



              (3) edit/create /etc/postfix/smtppasswd and add

              your_isp_mail_server your_isp_username:your_isp_password



              (4)

              $ cd /etc/postfix
              $ postmap senders
              $ postmap smtppasswd



              (5) test it out; I think in Mac OS 10.4 and later, postfix is setup to start
              automatically if you use the sendmail command. If it doesn't work, though, you can
              try issuing 'postfix start' which will start the daemon. Doing 'mailq' will show
              you what's currently in the mail queue to be sent, so you can see errors. Logs are
              in /var/log/mail.log* so you can troubleshoot. Easiest way to test is just to send
              some mail from the commandline

              $ sendmail some_email_address << END
              From: me <my_email_address>
              To: you <your_email_address>
              Subject: This is a test mail

              Here is the body of the email.

              END



              Once that much works, anything that uses the sendmail interface should work, and I
              presume git-send-email does.

              Do let me know if this helps/works/...

              Cheers,

              Ben.





              Send instant messages to your online friends http://au.messenger.yahoo.com


              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            Your message has been successfully submitted and would be delivered to recipients shortly.